Are there any jquery features to query multi-dimensional arrays in a similar fashion to the DOM?

前端 未结 3 545
有刺的猬
有刺的猬 2021-01-04 21:12

What the question says...

Does jQuery have any methods that will allow you to query a mult-dimensional array of objects in a similar fashion as it does with the DOM.

3条回答
  •  一向
    一向 (楼主)
    2021-01-04 21:46

    You may find a plugin, but not in the jQuery core. There are a few helpful array methods: each, unique, inArray. In combination, you could create something custom to meet your needs.

    What you are searching for is more of a set library with xpath like traversal. Prototype has a much larger set of array methods. But still probably wouldn't meet your exact needs out of the box.

    I agree with alex, such a library/extension would be interesting.

提交回复
热议问题