I have deserialized a json array successfully and i am able to pull out certain value using an index at an instance e.g ,, however i am struggling to use an index variable and get that information out in a loop
when i replaced the number this index it gave a parsing error
try to use concatenation. Something like this:
parsedJson.SelectToken(“outputValues.json-output[” + i.ToString + “.tax”).ToString
it gave a similar error as before "Unexpected character while parsing path indexer: .
Hi @Ismail_Naous, can you share the error screenshot.
parsedJson.SelectToken("outputValues.json-output[" + i.ToString()+ "].tax").ToString()
looks like missing closing ]
parsedJson.SelectToken("YourPropertyName[" + i.ToString + "].tax").ToString
That’s right. When I wrote expression, I missed closing “]”
parsedJson.SelectToken(“outputValues.json-output[” + i.ToString + “].tax”).ToString
Yes, this works now ! Thank you Piotr !
I was looking for this. It works.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.