i have a customer list object back from server and i want to display in my view. What’s the best way to do this? for instance, showing the customers in a div on the page
Share
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.
Please briefly explain why you feel this user should be reported.
It depends on your business and how you want to display it. There is no generic solution for this.
In case you want to display the json “as is” (don’t know why you’d like to to this, maybe for debugging), you could put it inside a pre:
JSON.stringify will work on modern browsers.
But, (I insist), there is no “correct” answer for your question, it depends specifically on your “business” needs.