Javascript Equivalent to C# LINQ Select

前端 未结 12 1526
孤街浪徒
孤街浪徒 2020-12-02 06:33

Following this question here :

Using the checked binding in knockout with a list of checkboxes checks all the checkboxes

I\'ve c

12条回答
  •  爱一瞬间的悲伤
    2020-12-02 06:59

    You can try manipula package, which implement all of C# LINQ methods and save its syntax: https://github.com/litichevskiydv/manipula

    https://www.npmjs.com/package/manipula

    Your example selectedFruits.select(fruit=>fruit.id); will be implemented with manipula as

    Manipula.from(selectedFruits).select(fruit=>fruit.id);
    

提交回复
热议问题