How do I convert the this object to an array.
Please help me, many thanks.
Agent Cosmic 0 Junior Poster in Training
Recommended Answers
Jump to PostIt can already act like an array
Dot Operatorvar someObject = { someProp : 9, someFunc : function () { return this.someProp; } }; alert(someObject.someFunc()); // 9
Array Accessor
var someObject = { someProp : 9, someFunc : function () { return this['someProp']; } …
All 3 Replies
ShawnCplus 456 Code Monkey Team Colleague
harrierdh 0 Junior Poster in Training
Agent Cosmic 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.