0

I have a list like this (but with more items) which comes from a json file:

"params": [ { "p": 512, "o": 0, "v": 7, "w": 0.636 }, { "p": 329, "o": 0, "v": 145, "w": 13.18 }, { "p": 42, "o": 0, "v": 42, "w": 3.818 } ]

Is there a way that I can extract for example the index of the item where "p":42 ?

My goal is to set a variable equal to the parameter "w" where the parameter "p" is 42.

In this example my variable would be equal to 3.818

Note that for other parameters lists the order and the number of items changes.

0 Answers0