bradjasper / ImportJSON

Import JSON into Google Sheets, this library adds various ImportJSON functions to your spreadsheet
GNU Lesser General Public License v3.0
2.1k stars 1.06k forks source link

How to filter parameter #88

Open lincolnaleixo opened 6 years ago

lincolnaleixo commented 6 years ago

Is it possible to filter parameter on a extensive json? For example how to get the "bid" from the row with "id":"NTRN_BTC" ? below: {"id":"NTRN_BTC","last":"0.00001346","volume":"0.00023557","ask":"0.00001410","bid":"0.00001346"},{"id":"SPLB_BTC","last":"0.00005300","volume":"1.06666244","ask":"0.00005898","bid":"0.00005300"},{"id":"XZX_BTC","last":"0.00036002","volume":"0.03426571","ask":"0.00042000","bid":"0.00037000"},{"id":"KRT_BTC","last":"0.00005230","volume":"46.10013424","ask":"0.00005284","bid":"0.00005230"},{"id":"FLEA_BTC","last":"0.00000248","volume":"3.61800239","ask":"0.00000248","bid":"0.00000232"},{"id":"AQA_BTC","last":"0.00003583","volume":"0.98869620","ask":"0.00003985","bid":"0.00003585"},{"id":"AIRIN_BTC","last":"0.00001994","volume":"0.19729969","ask":"0.00001999","bid":"0.00001994"},{"id":"MCC_BTC","last":"0.00000101","volume":"0.09132729","ask":"0.00000101","bid":"0.00000085"},{"id":"MLM_BTC","last":"0.00000058","volume":"0.03694133","ask":"0.00000079","bid":"0.00000061"},{"id":"TRTT_BTC","last":"0.00000869","volume":"14.18608967","ask":"0.00000842","bid":"0.00000841"},{"id":"KEC_BTC","last":"0.00082019","volume":"6.16796479","ask":"0.00086779","bid":"0.00082019"},{"id":"KEC_MONA","last":"2.000000","volume":"137.83726000","ask":"0.000000","bid":"0.000000"},{"id":"XRH_BTC","last":"0.00003027","volume":"19.88928221","ask":"0.00003250","bid":"0.00003124"},{"id":"XND_BTC","last":"0.00000020","volume":"0.05494948","ask":"0.00000043","bid":"0.00000020"},{"id":"SCS_BTC","last":"0.00006150","volume":"0.07627610","ask":"0.00011500","bid":"0.00006150"}, Couldn't get with the path "/id=NTRN_BTC,/bid"

Thanks

jackcarey commented 6 years ago

you can use the query parameter and enter "/id,/bid" to return just those columns with importJSON, then a Google Sheets QUERY function to filter from there. This is not an issue with importJSON