Forum Discussion

luluberlu's avatar
luluberlu
Occasional Contributor
6 years ago
Solved

Add a check of non existence in a API response

i have this kind of API response :    {"response": {"responsesRecherche": {    "1":    {       "consultation":       {          "Id": "16391821108191",          "referenceFonctionnelle": ...
  • luluberlu's avatar
    luluberlu
    6 years ago

    hi.

    I try but it don't work. same error "groovy.lang.MissingPropertyException: No such property: Date de création for class: java.lang.String

    I try this just after : 

    if (Slurp[i].("Date de création")) {
      if (Slurp[i]."Date de création" < testdate) {checkdate = false }
      assert checkdate
       i++}
    }

    but i got the same error :( 

    i think i should use "contains" method rightly.