exists filter

37 views
Skip to first unread message

n...@bonobo.ai

unread,
Sep 25, 2018, 11:24:25 AM9/25/18
to ObjectPath
Hey,

Is there a way to check if inner field exists in object?

for example:
obj1 = {
    "movie":  {
          "director": "director_name",
          "starring": ["actor1", "actor2"]
     }
}

obj2 = {
    "tv_show": {
         "director": "director_name",
         "starring": ["actor1", actor2"],
         "num_seasons": 15
}


when executing:
obj1.execute("exists($.movie.num_seasons)")
should return false

obj2.execute("exists($.tv_show.num_seasons")
should return true
Reply all
Reply to author
Forward
0 new messages