According to your structure of data[0]['Set1'][0]['Attribute1'], which can be written as data[0].Set1[0].Attribute1, here is code, but I think you don't quite understand how many sets you were asking for.
var wrapper, outsideFunction;
wrapper = function(){
someOb = {};
var data = [
{
Set1: [
{
Attribute1: null, // we will change null to 'asdf' below
},
],
},
];
outsideFunction(data, someOb);
console.log( someOb.newProp, someOb.dumb );
// outputs 'hehehehe', undefined
};
outsideFunction = function(data, blah) {
data[0].Set1[0].Attribute1 = 'asdf';
//blah is a reference to someOb
// we can change a part of blah and it will look at the reference and change someOb
blah.newProp = 'hehehehe';
// but if we do `blah =`, then we reference a new object
// This won't affect someOb, blah will just be a different object talking about something else
blah = { dumb: false };
};
So, like I was saying, your data object is a numbered set, ( you have [0] ), then a named set (Set1), then a numbered set ( [0] ), I don't think you mean to nest so much.
numberedSet = [
{
name: 'dan',
likes: [
'coding', 'girls', 'food',
],
},
{
name: 'Sreekesh',
},
]
namedSet = {
dan: {
isPerson: true,
likes: [
'coding', 'girls', 'food',
],
},
Sreekesh: {
isPerson: true,
askedQuestion: function(){
return true;
},
}
};
numberedSet[0].name == dan; // true
numberedSet[0].likes[1] == 'girls'; // true
namedSet.dan.isPerson == true; // true
namedSet.Sreekesh.askedQuestion(); // true