uonedb-qt team mailing list archive
-
uonedb-qt team
-
Mailing list archive
-
Message #00008
Re: Referencing Document properties other than the just content text
On 2013-03-07 12:20, Kevin Wright wrote:
> On 03/07/2013 12:18 PM, Christian Dywan wrote:
>> On 2013-03-07 10:46, Kevin Wright wrote:
>>> For example, I want to make a ListView that contains the JSON string's
>>> left side values (e.g. 'hello', hello2'), not the right side values.
>> You can access the keys like this, with standard Javascript:
>>
>> Object.keys (contents)
>>
>> for (var i in contents) contents[i]
>>
>
> Perfect. That is exactly what I was after.
>
> Is this documented somewhere? Is it inherited from the Qt framework
> itself or is it U1Db specific?
It's standard Javascript. The exact same syntax works in a webpage. This
is one benefit of sharing the Javascript implementation between QML and
WebKit.
Follow ups
References