Pass Variable name as value in json object

Hi all,

I want little bit help from you. I am learning ajax, json.

How can we pass variable name (not value) in json object. & sharing my code herewith.

var rows= { Token: ‘" + Tokan + "’, UniqueId: ‘" + uinque_id + "’, TESTCODE: ‘" + TESTCODE + "’, TESTNAME: ‘" + TESTNAME +"’};

it is not working.

I’m not quite sure exclactly what you’re doing there, but

var rows =
    { token: token
    , name: name
    , uniqueId: uniqueId
    , TESTCODE: testcode
    , TESTNAME: testname
    };

JSON.stringify(rows);

Just run JSON.stringify on an object and it will turn it into a JSON string