I want to create a json object in javascript/jquery. For this Class A i want its json object.
Class A
{
string test1;
B b1;
}
Class B
{
string test2;
List< C> collectionOfCType;
}
Class C
{
int h;int w;
}
Inside my js- I am able to get json object having value of test1 of A but b1 value is showing undefined.
var A=
{
"test1": "abc",
"b1": B
}
var B =
{
"test2": "def",
... so on ..
}
Please help!
b1supposed to be an instance ofB? Where do you construct these objects, where does the string"abc"come from?