1
如何僅返回訂單中的嵌套列表元素:id匹配127?如何在列表中搜索「訂單」,而無需知道它的位置(僅按價值進行搜索)?如何從Elixir的嵌套列表中篩選特定值?
orders
[[id: 123, ship_to: :NC, net_amount: 100.0],
[id: 124, ship_to: :OK, net_amount: 35.5],
[id: 125, ship_to: :TX, net_amount: 24.0],
[id: 126, ship_to: :TX, net_amount: 44.8],
[id: 127, ship_to: :NC, net_amount: 25.0],
[id: 128, ship_to: :MA, net_amount: 10.0],
[id: 129, ship_to: :CA, net_amount: 102.0],
[id: 139, ship_to: :NC, net_amount: 50.0]]
期望的結果:[ID:127,ship_to:...]
太感謝你了,這是我需要的! – PuckRockGrrl