Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
173 views
in Technique[技术] by (71.8m points)

Json parsing help finding key and value

I am having trouble trying parse some json data. The problem is it is sometimes in a different format. I've worked out the best way is to iterate through the data taking a jsonobject.

The problem I have is I need to check whether a specific key exists with a certain value. However the key maybe in the json multiple times and jsonobject.has doesn't always return the key I am looking for.

How would I check that a key "@type" exists with a value of "Recipe"?

question from:https://stackoverflow.com/questions/65928884/json-parsing-help-finding-key-and-value

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...