Re: Get value from JSON

2016-01-21 Thread Alex Latorre
Thank you so much Marc!! It works perfect! :) El jueves, 21 de enero de 2016, 16:36:31 (UTC+1), Marc O'Morain escribió: > > The `get-in` function will help you: > > > user=> (def result {:results [{:series [{:name "solr.numPedidos5", > :columns ["time" "last"], :values [["1970-01-01T00:00:00Z" 0]

Get value from JSON

2016-01-21 Thread Alex Latorre
Hi all, I'm trying to get a value from a JSON. I query an influxdb database and I get the next reply: {:orig-content-encoding gzip, :trace-redirects [http:///query?pretty=true;db=riemann;q=select%20last(value)%20from%20%22solr.numPedidos5%22%20where%20idTag%20=%20%27ADE99003392%27], :requ

Re: Get value from JSON

2016-01-21 Thread Marc O'Morain
The `get-in` function will help you: user=> (def result {:results [{:series [{:name "solr.numPedidos5", :columns ["time" "last"], :values [["1970-01-01T00:00:00Z" 0]]}]}]}) #'user/result user=> (get-in result [:results 0 :series 0 :values 0 1]) 0 On 21 January 2016 at 15:29, Alex Latorre wrot