Filter items in JavaScript Array using jQuery

后端 未结 3 1215
不思量自难忘°
不思量自难忘° 2021-02-05 16:39

I have a JavaScript array as below which I need to filter to get the correct child values from the test data below.

var arrChildOptions2 = [
        {Parent:\'o         


        
3条回答
  •  孤城傲影
    2021-02-05 17:22

    You might have more luck using the jQuery.grep() function rather than messing around with loops.

    This function "Finds the elements of an array which satisfy a filter function. The original array is not affected".

提交回复
热议问题