Query a JSON list of dict -


[{"time":136803,"price":"1.4545","amount":"0.0885","id":"112969"},  {"time":136804,"price":"2.5448","amount":"0.0568","id":"5468489"},  {"time":136805,"price":"1.8948","amount":"0.0478","id":"898489"}] 

i have large json file 1 above. list of dictionaries. want choose time , find value assoaciated time. not know in list time located value time. there way can say, time 136804, make x = price? or should loop through each value? want use value (x) in mathematical function.

my fist idea use brute force going through each item , checking matching time value in loop.

is best way?

take @ spahql http://danski.github.io/spahql/ use query json in order select values , subsequently change them required.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -