40
rated 0 times
[
41]
[
1]
/ answers: 1 / hits: 16186
/ 13 Years ago, thu, april 14, 2011, 12:00:00
I want to do the following
var my_json = {
a : 'lemon',
b : 1
}
function obj(json){
this.a = 'apple';
this.b = 0;
this.c = 'other default';
}
after assigning
var instance = obj(my_json)
I want to get
instance.a == 'lemon'
More From » json