all your solutions are ok. But how can I pass a string-variable as json’path. I tried i.e.:
str_jsonPath = " ““main””)(““temp”” "
val = jsonObj ( str_jsonPath ).ToString
// I need it cause I have to extract a lot of values (>30) with different paths in json; i.e. with a foreach path … ( the paths for all values are written in a dt)
// if it’s written direkt, it works:
jsonObj ( “main” )(“temp”).ToString,
jsonObj ( “weather” )(0)(“main”).ToString,…
hier a nice example if array in path (see json’example from the original topic’user):
str_jsonPath = “$.weather(0).main”
val = jsonObj.SelectToken( str_jsonPath ).ToString