1

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)
1
  • What do you mean you have an array of an array? Commented May 28, 2012 at 22:38

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.