Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to parse functions stored as strings in object literal/JSON syntax and differentiating?

user-image
Question added by Salem Al Badawi , Web Developer , Electronic Company for High Technology
Date Posted: 2013/09/17
Khadijah Shtayat
by Khadijah Shtayat , Technical Lead , Opensooq

IF  I got what you ask for .check the example please 

function testFunction() {

alert("Hello I am json funcation");

}

var jsonObj ={"id":2013,"fun":"testFunction()"}

eval(jsonObj.fun)

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.