How to find a specific tag in json, if its available or not

i am trying to make a dictionary app using JSON. App is ready to use but i am facing a problem.

when i search any keyword like - subject then the json code returns [noun, verb, adverb, adjective] and when i search a keyword like - clothes then the json code returns only [plural noun]. so my question is how to check if the tags i want returned from json is available or not.

right now when i parse json text and if i get all 4 tags [noun, verb, adverb, adjective] from json response then app works ok. but if any of the tag is missing then it returns a alert like - no values for {missing tag name}

My Blocks

JSON Response Eg 1

[
{
    "word": "subject",
    "phonetic": "/ˈsəbdʒɛkt/",
    "meaning": {
        "noun": [
            {
                "definition": "A person or thing that is being discussed, described, or dealt with.",
                "example": "I've said all there is to be said on the subject",
                "synonyms": [
                    "theme",
                    "subject matter",
                    "topic",
                    "issue",
                    "question",
                    "concern",
                    "text",
                    "thesis",
                    "content",
                    "point",
                    "motif",
                    "thread"
                ]
            },
            {
                "definition": "A branch of knowledge studied or taught in a school, college, or university.",
                "synonyms": [
                    "branch of knowledge",
                    "branch of study",
                    "course of study",
                    "course",
                    "discipline",
                    "field",
                    "area",
                    "specialism",
                    "speciality",
                    "specialty"
                ]
            },
            {
                "definition": "A citizen or member of a state other than its supreme ruler.",
                "synonyms": [
                    "citizen",
                    "national",
                    "native",
                    "resident",
                    "inhabitant"
                ]
            },
            {
                "definition": "A noun phrase functioning as one of the main components of a clause, being the element about which the rest of the clause is predicated."
            },
            {
                "definition": "A thinking or feeling entity; the conscious mind; the ego, especially as opposed to anything external to the mind."
            }
        ],
        "adjective": [
            {
                "definition": "Likely or prone to be affected by (a particular condition or occurrence, typically an unwelcome or unpleasant one)",
                "example": "he was subject to bouts of manic depression",
                "synonyms": [
                    "susceptible to",
                    "liable to",
                    "prone to",
                    "vulnerable to",
                    "predisposed to",
                    "disposed to",
                    "apt to suffer from",
                    "likely to suffer from",
                    "easily affected by",
                    "in danger of",
                    "at risk of",
                    "open to",
                    "wide open to"
                ]
            },
            {
                "definition": "Dependent or conditional upon.",
                "example": "the proposed merger is subject to the approval of the shareholders",
                "synonyms": [
                    "conditional on",
                    "contingent on",
                    "dependent on",
                    "depending on",
                    "controlled by"
                ]
            },
            {
                "definition": "Under the authority of.",
                "example": "legislation making Congress subject to the laws it passes",
                "synonyms": [
                    "bound by",
                    "constrained by",
                    "answerable to",
                    "accountable to",
                    "liable to",
                    "under the control of",
                    "at the mercy of"
                ]
            }
        ],
        "adverb": [
            {
                "definition": "Conditionally upon.",
                "example": "subject to bankruptcy court approval, the company expects to begin liquidation of its inventory"
            }
        ],
        "verb": [
            {
                "definition": "Cause or force to undergo (a particular experience of form of treatment)",
                "example": "he'd subjected her to a terrifying ordeal",
                "synonyms": [
                    "put through",
                    "treat with"
                ]
            },
            {
                "definition": "Bring (a person or country) under one's control or jurisdiction, typically by using force."
            }
        ]
    }
}
]

JSON Response Eg 2

[
{
    "word": "clothes",
    "phonetic": "/klō(T͟H)z/",
    "meaning": {
        "plural noun": [
            {
                "definition": "Items worn to cover the body.",
                "example": "he stripped off his clothes",
                "synonyms": [
                    "clothing",
                    "garments",
                    "articles of clothing",
                    "articles of dress",
                    "attire",
                    "garb"
                ]
            },
            {
                "definition": "Bedclothes."
            }
        ]
    }
}
]

If you have any solution then do let me know…

Thanks

Use the contain text piece block for the solutions

1 Like

Maybe it would be nice if you explain these things in Kodular Creator.

A little more explanation would have been nice, however it is here.

image

1 Like

yes… i think it will work… ill try and let you know guys…

1 Like

contains text block is not an event.

1 Like

thanks everyone… answer is so simple… didn’t think that the contains text piece block will work that way… thanks @avmcreators02

2 Likes

Sorry for my mistake

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.