动态变量获取数组值 [英] Dynamic Variable gets an Array Value
本文介绍了动态变量获取数组值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我在创建一个会加载数组值的动态变量时遇到了一些麻烦:
$ this_content_json [" content" ] [0] [热门程度]
当我使用上面的行'硬编码''时,它可以正常工作。但是当我使用下面的代码作为动态变量时,它会失败:
$ {''this_content_json [" content"] [0] [" popular"]''}
任何帮助都会得到很多赞赏。
泰勒
Hello,
I''m having some trouble creating a dynamic variable that will load an array value:
$this_content_json["content"][0]["popularity"]
When I use the above line ''hard coded'', it works. But when I use the code below as a dynamic variable, it fails:
${ ''this_content_json["content"][0]["popularity"]'' }
Any help would be muchos appreciados.
Tyler
推荐答案
this_content_json [" content"] [0] [" popular"]
当我使用上面的行''hard coded''时,它有效。但是当我使用下面的代码作为动态变量时,它会失败:
this_content_json["content"][0]["popularity"]
When I use the above line ''hard coded'', it works. But when I use the code below as a dynamic variable, it fails:
{''this_content_json [" content] [0] ["受欢迎程度"''}}
任何帮助都会得到很多赞赏。
Tyler
{ ''this_content_json["content"][0]["popularity"]'' }
Any help would be muchos appreciados.
Tyler
什么关于第二个例子是如此动态?
您是否尝试将其显示在字符串中?
Dan
what is so dynamic about the second example?
Are you trying to display it in a string?
Dan
这篇关于动态变量获取数组值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文