简体   繁体   English

操作从Java Map转换的JSON对象

[英]manipulate the JSON object converted from a java Map

Inside my action I've computed a json object from a map and I get: 在我的动作中,我从地图计算了一个json对象,然后得到:

{"angleEqual(angle(a,d,c),angle(a,e,b)).":{"allLinesId":"['DA','CD','AE','BE']","numberOfLinesWithinAGroup":2}}

When it comes to the front end it looked fine under the chrome debugging console, however, (driving me mad!!) how do I get the content of the value under the attribute of allLinesId and display, I thought it should be straightforward to do: 当涉及到前端时,在chrome调试控制台下看起来还不错,((让我发疯了!)如何在allLinesId属性下显示值的内容并显示,我认为这样做应该很简单:

var object= data.angleEqual(angle(a,d,c),angle(a,e,b)).;
object.allLinesId;
object.display;

Not worked out as a solution, thanks a lot if anyone can help. 没有解决方案,非常感谢任何人的帮助。

Try the bracket notation. 尝试使用括号符号。

var object = data['angleEqual(angle(a,d,c),angle(a,e,b)).'];
object.allLinesId;
object.display;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM