how to get companies id from linkedin jsapi

前端 未结 1 1300
礼貌的吻别
礼貌的吻别 2021-01-16 13:25

i was trying to get companies id from linkedin using jsapi,iam using below url

\"/company-search:(companies:(id,name))?keywords=ibm%20oracle%20infosys\"

i go

相关标签:
1条回答
  • 2021-01-16 13:39

    Use JSON.stringify plus a regexp for this:

    JSON.stringify({"companies": {
    "_count": 10,
    "_start": 0,
    "_total": 1079,
    "values": [
    {
      "id": 6005,
      "name": "Sonata Software"
    },
    {
      "id": 5983,
      "name": "QLogic"
    },
    {
      "id": 39626,
      "name": "Prosoft Technology Group"
    },
    {
      "id": 6290,
      "name": "BCC"
    },
    {
      "id": 23367,
      "name": "Goldstone Technologies"
    },
    {
      "id": 36655,
      "name": "SoftwareONE"
    },
    {
      "id": 10951,
      "name": "Sirius Computer Solutions"
    },
    {
      "id": 10046,
      "name": "ITWorx"
    },
    {
      "id": 7833,
      "name": "SYSTIME"
    },
    {
      "id": 57561,
      "name": "ZSL Inc"
    }
    ]
    }}).match(/id..\d+/g) 
    
    /* Returns:
    ["id":6005", "id":5983", "id":39626", "id":6290", "id":23367", "id":36655", "id":10951", "id":10046", "id":7833", "id":57561"] 
    */
    
    0 讨论(0)
提交回复
热议问题