如何从api有效负载中删除文档?

时间:2015-07-07 13:49:15

标签: json underscore.js

如何删除下划线js中的文档?

我有来自api

的回复的这个集合
I20150707-21:43:38.217(8)?{ next: 'https://cloudalytics-api-phx.prod.jivehosted.com:443/analytics/v2/export/activity/lastday?startIndex=100&count=100',
I20150707-21:43:38.217(8)?   itemsPerPage: 100,
I20150707-21:43:38.217(8)?   totalCount: 177687,
I20150707-21:43:38.217(8)?   currentPage: 1,
I20150707-21:43:38.217(8)?   totalPages: 1777 }
I20150707-21:43:38.315(8)? [ { name: 'ACTIVITY_PEOPLE_SEARCH',
I20150707-21:43:38.315(8)?     timestamp: 1436276604627,
I20150707-21:43:38.315(8)?     context: { web: [Object] },
I20150707-21:43:38.315(8)?     payload: { KEYWORDS_PARAM: 'old emails*' },
I20150707-21:43:38.316(8)?     actorID: 1174358,
I20150707-21:43:38.316(8)?     actorType: 3,
I20150707-21:43:38.316(8)?     activityType: 'People',
I20150707-21:43:38.316(8)?     actionObjectId: -1,
I20150707-21:43:38.316(8)?     actionObjectType: 109,
I20150707-21:43:38.317(8)?     activity: 
I20150707-21:43:38.317(8)?      { actor: [Object],
I20150707-21:43:38.317(8)?        action: 'People',
I20150707-21:43:38.317(8)?        actionObject: [Object],
I20150707-21:43:38.317(8)?        activityTime: 1436276604627 } },...etc

我要删除第一个文档{next,...}

1 个答案:

答案 0 :(得分:0)

我设法在不使用underscore.js

的情况下删除第一个文档

API call中有响应具有不同的json格式json api 。在我的情况下,你只需要包含一些你不需要的资源。

随时可以编辑。