How to Parse a specific ID number in Json SOURCE using CSS or JSON?

Hello there.

So my question is how do i Parse a specific ID number from the SOURCE using CSS or JSON

Say i want to Parse 113 in {"id":"113" with using CSS or JSON, notice this numbers changes so it’s not gonna be always the same that’s why i want to parse a specific id position from SOURCE

so what the CSS or JSON input with specific position for {"id":" would be?

SOURCE Example

{"js":[{"id":"*","title":"All","alias":"All","bysimple":true,"censored":0},{"id":"3","title":"ALive: Super","modified":"","number":1,"alias":"live: Super","censored":0},{"id":"110","title":"ALive: Magic","modified":"","number":2,"alias":"live: Magic","censored":0},{"id":"113","title":"Live: Welcome","modified":"","number":3,"alias":"live: Welcome","censored":0},{"id":"111","title":"Live: AfterWork","modified":"","number":4,"alias":"live: AfterWork","censored":0}]}

Thank you so much in advance for any helping <3

Use this jtoken to get all IDs (tick recursive option)

js[*].id

or this for the first only

js[0].id
2 Likes

nvm i find it out in cause anyone else want to do something simillar.

  • Parse Option is: JSON

  • in Field Name: $.js[3].id

  • Turn ON: JToken Parsing

  • Result Capture: ID (Single) = 113

thanks Ruri i actually followed this and i spend few hours trying to figure it out and i was getting x.js[2].id

x. wasn’t the right to use, and after a while i read JSONPath - XPath for JSON

and found $. and it work with it xD.

1 Like

It also works without anything just like js[3].id

2 Likes

yeah that the slap xD

i am not so much into the parsing but i am learning, thank you so much your the best <3

1 Like