I need to extract values from a JSON string so that I can compare them. I only need to check that they are in order (up / down). I was going to check the first and second "choices" and compare. I am no more advanced.
EDIT / UPDATE: How can I use wildcards (*) in this type of query to skip each segment?
string one = (string)o[this.Context[*WILDCARD*]["cid1"]].ToString(); /* this works, but has too many [] string one = (string)o[this.Context["partner"]] [this.Context["campaign"]] [this.Context["segment1"]] [this.Context["segment2"]] [this.Context["qid2"]] ["community"] [this.Context["cid1"]].ToString(); */ { "partner": { "campaign": { "round1": { "round2": { "def123": { "community": { "choicec": 28 }, "user": { "choice": "choicec", "writeDateUTC": "2015-06-15T17:21:59Z" } } }, "abc321": { "community": { "choicec": 33 }, "user": { "choice": "choicec", "writeDateUTC": "2015-06-15T17:21:59Z" } } } } } }
source share