将.push的结果解释为数组

时间:2016-02-10 20:21:31

标签: javascript arrays api push trello

Starting launch process C:\Program Files (x86)\nodejs\node.exe "(redacted)\node_modules\vs-tac\emulator.js" --platform ios --action launch --path "(redacted)\buildInfo.json" --serverUrl https://(redacted):3000/cordova --certificateName (redacted) --language en-US --loglevel info  --cliVersion 5.4.1 --npmInstallDir "(redacted)"  --deployTarget "iPhone 5"
Timed out connecting debugger to remote Apache Cordova app. See Output window for JavaScript console output.
------ Cordova tools 5.4.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 5655 on server https://(redacted):3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 5.4.1 already installed.
Requesting debug on remote iOS device for buildNumber 5655 on server https://(redacted):3000/cordova...
Failed to Debug iOS remote for build (redacted)\buildInfo.json to https://(redacted):3000/cordova :
iPhone 5

我正在使用Trello API查找核对表状态,核对表项目名称和列表ID。我正在尝试将每个数据实例推送到全局数组,以获取Array [Array 1,Array [8] ...]等。此代码的控制台记录:

Click to view image of how the .push method worked

我需要能够再次循环遍历全局数组,但在使用.push之后,尝试获取全局数组的长度,得到的长度为0.我尝试使用相同的结果推送对象:它看起来像.push有效,但它正在推动相同的索引。

我如何解决这个问题,以便获得一个可以重新循环的数组数组(或一组对象)?我非常喜欢初学者,所以很感激反馈。

0 个答案:

没有答案