Can I do a foreach on a function that takes an array object and sorts it. I know I can do a dependent observable, but I have an array of an array coming from the mapping plugin.
foreach: sortList($array)
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.
Yes… Here’s a fiddle to demonstrate:
http://jsfiddle.net/jearles/sHQvV/
It shows three usages of foreach:
1) Plain
2) Function returning array
3) Object with data property containing an array
The foreach documentation describes this.