Details
-
Suggestion
-
Resolution: Duplicate
-
P2: Important
-
4.7.0
-
None
Description
I'm not sure if this is a bug or a known limitation. If latter then please assign this to the documentation project and ask them to mention the limitation here: http://doc.qt.nokia.com/4.7-snapshot/qdeclarativejavascript.html#qml-javascript-restrictions
import Qt 4.7 Rectangle { width: 600 height: 600 property variant a Component.onCompleted: { a = {"name":"arska","occupation":"baker"}; console.log(a); console.log(a.name); console.log(a['name']); } }
The output is:
[object Object]
undefined
undefined
instead of the expected:
[object Object]
arska
arska