erik
Posts: 0
Joined: Sun Mar 18, 2012 6:12 pm

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

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

erik
Posts: 0
Joined: Sun Mar 18, 2012 6:12 pm

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

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

The mapping looks like this:
Image

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

erik
Posts: 0
Joined: Sun Mar 18, 2012 6:12 pm

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

ok, that's work. Thank you max

Shlomi
Posts: 0
Joined: Wed Mar 28, 2012 7:20 am

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

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

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

Shlomi
Posts: 0
Joined: Wed Mar 28, 2012 7:20 am

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

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?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

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.

Return to “Issues”