我有一个对象,其中包含以点“journey.hintText.journeyTags”为键的字符串。(由我无法修改的 api 响应返回)。我想破坏像 const {journey.hintText.journeyTags} = content 这样的内容对象,但它会引发错误。请让我知道如何破坏内容对象,非常感谢。
const content = {journey.hintText.journeyTags: 'Please select a tag'}
我有一个对象,其中包含以点“journey.hintText.journeyTags”为键的字符串。(由我无法修改的 api 响应返回)。我想破坏像 const {journey.hintText.journeyTags} = content 这样的内容对象,但它会引发错误。请让我知道如何破坏内容对象,非常感谢。
const content = {journey.hintText.journeyTags: 'Please select a tag'}