Last active
May 31, 2017 23:12
-
-
Save gsemino/ed41bb4be5fc5f1d856818f4335449d6 to your computer and use it in GitHub Desktop.
SYNQ userdata Query API example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//userdata query find all every where year is 2017 and the model name is c | |
if (video.userdata.cars) | |
{ | |
if (video.userdata.cars[0]["year"] == 2017 && | |
_.includes(video.userdata.cars[0].models, "c")) | |
{ | |
return {"id":video.video_id, "cars_userdata": video.userdata.cars} | |
} | |
} | |
//sample body response from Query API: | |
[ | |
{ | |
"id": "61ed487958d54b278f47881234567891", | |
"cars_userdata": [ | |
{ | |
"make": "mercedes", | |
"year": 2017, | |
"models": [ | |
"slk", | |
"c", | |
"cls" | |
] | |
} | |
] | |
}, | |
{ | |
"id": "07de8dc488e64803b85aae1234567891", | |
"cars_userdata": [ | |
{ | |
"make": "lexus", | |
"year": 2017, | |
"models": [ | |
"c", | |
"cl", | |
"lv" | |
] | |
} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment