contact picker API එකක් use කරලා ගන්න JSON object එකේ තියෙන contacts list එක array එකකට ගන්න විදිය දන්න කෙනෙක් කියන්නෝ.. angular framwork එක use කරන්නේ..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
You can push objects to the array as follows.
EgJsonObjectReturned = {
001:{
“title”: “MyName”,
“descreption”: “Some decreption”
}
}
for (var key : EgJsonObjectReturned ){
arr.push({id: key, name: key[“name”], description: key[“description”]})
}
finally the array will look like: arr = [{id: 001, name: “MyName”, description:”myDescription”}]
If you got any syntax errors please let me know
*Correction: colon in for loop condition must be replaced with ‘in’ keyword
Reffer this link: https://github.com/shakyapeiris/meetup_web/blob/98500732e2aef122dfc24baf7da6f1eef8a33a24/pages/index.js#L20
Thank you so much ShakkiTheCoder. This is really helpful. I will try this method. ❤️
Your Welcome
Your answer was very helpful. I was able to do that task by adding some improvements to your code. Thank you again.
ShakkiTheCoder දීල තියෙන answer එක හරි ඇති බොහෝ විට.ඒක try කරල බලන්න.
wait for others answers
I don’t know about it