Open flenoir opened 11 months ago
Hi! You can't treat directly a json object like an ordered list of key/value pairs
I don't know if this helps but you can order the keys using @pretty:{"sortKeys":true}
For example:
result2 := gjson.Get(json2, "@pretty:{"sortKeys":true}|hits.hits")
This will ensure that all keys for the entire JSON are sorted.
Hi,
I did check all repo and couldn't find an answer about this.
Mu code is like below and i'm using "ForEach" to loop on a json object. I'd like to compare the current value to the next one to check if the values are the same.
How can i access the next value ? i did try to use "key" valueassociated to "value" but couldn't find a proper way.
Is it possible to do so ?
Thanks