无法访问Promise对象

时间:2018-06-28 23:25:10

标签: javascript object promise

console.log(TransactionDataPromise[0]);

记录以下对象:

Promise {
  {
    blockHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
    blockNumber: null,
    from: '0x88B837d3528Fb13192e0b7b1009632A8372d8c8a',
    gas: 1000000,
    gasPrice: '15000000000',
    hash: '0xa1d5a80b738504acb30663c7d7ae869c52ca5430738c679536f8dfb72e770610',
    input: '0x741dfb1e000000000000000000000000000000000000000000000000000b8bdb9785200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d',
    nonce: 12530,
    to: '0x6f9B3f0640Bf7358C87d1d7f2Df1A546Df0E8C08',
    transactionIndex: 0,
    value: '0',
    v: '0x2b',
    r: '0xcd46cea5babf84761ac4aaf7d9351264f51f82c0739829ad1d9a336d03a6900d',
    s: '0x61314be797bb7fcbf00bfeb6e34d318281cac58f665bdc26e38cf7e718d0abf6'
  }
}

但是

console.log(TransactionDataPromise[0].to);

显示undefined,而我期望0x6f9B3f0640Bf7358C87d1d7f2Df1A546Df0E8C08。如何访问此to属性?

0 个答案:

没有答案