Filtering JSON data

后端 未结 8 588
暖寄归人
暖寄归人 2020-12-24 08:59

I have a JSON file which contains data like the following:

{\"posts\": [ 
    { \"title\":\"1\", \"url\":\"n1.png\" }, 
    { \"title\":\"2\", \"url\":\"n2.p         


        
8条回答
  •  臣服心动
    2020-12-24 09:14

    There is another solution to this: using jLinq.js (documentation), which has even more features. In this case, you can get the solution by using the following code:

    var selectedPosts = jLinq.from(posts)
                             .betweenEquals("title",4,8)
                             .select();
    

提交回复
热议问题