小编Ric*_*uan的帖子

How to convert an array of objects in an array of integers extracting values from those objects using ramda.js?

I'm trying to convert an array of objects into an array of integers extracting values from those objects using Ramda.js. I need to keep just the node participants with the uid values, however, it seems that I'm not doing this correctly.

I'm want to transform this

var listObejcts = {
  "participants": [
    {
      "entity": {
        "uid": 1
      }
    },
    {
      "entity": {
        "uid": 2
      }
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

to this:

{
  "participants": [1, 2]
}
Run Code Online (Sandbox Code Playgroud)

I've tried the code above …

javascript ramda.js

1
推荐指数
1
解决办法
87
查看次数

标签 统计

javascript ×1

ramda.js ×1