Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. item: {
  2. id: 1,
  3. variants: [
  4. {
  5. id: 1,
  6. prices: [
  7. {
  8. needle: 100
  9. }
  10. {
  11. needle: 200
  12. }
  13. ]
  14. }
  15. ]
  16. }
  17.  
  18. item.variants.Select(v => v.needle.ToString()))
  19.  
  20. item.variants.Where(x => x.prices != null)
  21. .SelectMany(v =>
  22. v.prices.Select(p =>
  23. p.needle.ToString()
  24. ).Distinct()
  25. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement