To return that json, just(要返回该json,只需)
res.json(response.body['<Some dynamic Content>'].callSummary);
Adding some validation and error handling would be a good idea before sending the response.(在发送响应之前,添加一些验证和错误处理将是一个好主意。)
In case your key is just an example and you never know your first key value, and you always want the values of the first key(如果您的键只是一个例子,而您却不知道第一个键的值, 而您总是想要第一个键的值)
res.json(Object.values(response.body)[0].callSummary);
Object.values
returns an array, so you can iterate the values if you want manage more than the first one(Object.values
返回一个数组,因此,如果要管理多个值,则可以迭代这些值) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…