Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of NthElementKey #17

Closed
everplus opened this issue Feb 24, 2016 · 3 comments
Closed

Usage of NthElementKey #17

everplus opened this issue Feb 24, 2016 · 3 comments

Comments

@everplus
Copy link

I want to enumerate the javascript object keys. Can I use NthElementKey?
I try to use it, but failed, got nil.

Can anyone give me some help.

{
    "string":"hello",
    "number":123
}

I want to get "string" and "number", thanks

@oskca
Copy link
Member

oskca commented Feb 27, 2016

This has to be done with sciter API ValueEnumElements, but it's not wrapped yet. I'll do it late this day :)

@everplus
Copy link
Author

Thank you very much

@oskca
Copy link
Member

oskca commented Feb 29, 2016

And the Value.Isolate which converts the object to a T_MAP or a T_ARRAY can be combined with NthElementKey to achieve your goals according to c-smile/sciter-sdk#22 (comment) 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants