Page 1 of 1

i want to search specified record in parse with value of field

Posted: Sun Mar 18, 2012 6:12 pm
by erik

Hello,

if i have json data like this

{
"results": [
{
"text": "Testing1",
"objectId": "lqI3KR3QS7",
"point": "15",
"updatedAt": "2012-03-12T07:28:02.385Z",
"email": "a href="mailto:erik_sugih@yahoo.com" rel="nofollow"erik_sugih@yahoo.com/a",
"createdAt": "2012-02-28T03:47:34.106Z"
},
{
"text": "test",
"objectId": "8qfbnkHTXT",
"point": "10",
"updatedAt": "2012-03-12T07:27:19.389Z",
"email": "a href="mailto:erik@jadinpratama.com" rel="nofollow"erik@jadinpratama.com/a",
"createdAt": "2012-03-12T06:43:58.138Z"
}
]
}

example : i want to show the record that value of field email "a href="mailto:erik@jadinpratama.com" rel="nofollow"erik@jadinpratama.com/a",

can you help me? if i want that request value can be input.

Best Regards,

Erik


i want to search specified record in parse with value of field

Posted: Sun Mar 18, 2012 6:23 pm
by maxkatz

Sure, you can use Parse queries: https://parse.com/docs/rest#queries-c...


i want to search specified record in parse with value of field

Posted: Sun Mar 18, 2012 6:28 pm
by erik

hi max,
i already look at link that you gave, but can i mapping that value of request?


i want to search specified record in parse with value of field

Posted: Sun Mar 18, 2012 9:09 pm
by maxkatz

The mapping looks like this:
Image

and JavaScript code looks like this:
code
return '{"text":"'+value+'"}';
/code


i want to search specified record in parse with value of field

Posted: Mon Mar 19, 2012 12:03 am
by erik

ok, that's work. Thank you max


i want to search specified record in parse with value of field

Posted: Wed Mar 28, 2012 7:20 am
by Shlomi

but how can you map 2 values and not just one?


i want to search specified record in parse with value of field

Posted: Wed Mar 28, 2012 3:12 pm
by maxkatz

If you need to access other JSON values, use value.name1, value.name2 in JavaScript mapping function.


i want to search specified record in parse with value of field

Posted: Wed Mar 28, 2012 3:25 pm
by Shlomi

Do you mean the following:
return '{"text":"'+value.name1+'","suffix":"'+value.name2+'"}';
And, you can drag only one JSON value. How the query know what is the second value?


i want to search specified record in parse with value of field

Posted: Wed Mar 28, 2012 11:22 pm
by maxkatz

Sorry, I wasn't very clear. You would map an array to a grid, there you will be able to get values such as value.name1, value.name2 -- then use jQuery to select components and set them to values from the array.