I've 3 million lead objects and 5 thousand program objects, which will be mapped together using program activity, hence a lead object will have multiple program objects. So my question is can I store 3 million leads holding their programs in a single object?
eg:
{
"lead78354": {
"First Name": "test",
"Last Name": "test",
"Id": "78354",
"Email Address": "[email protected]",
"FirstLeadSource": "null",
"leadStatus": "Qualified",
"country": "US",
"SEInferredCountry": "null",
"LastProgramSuccess": "null",
"HistoryOfProgramSuccesses": "Dec 14, 2017 : US_All_Contact_Sale",
"programs": {
"program1": {
"id": 1324,
"description": "•\tContent selection LP & TY",
"createdAt": "2015-02-27T15:18:31Z+0000",
"updatedAt": "2017-12-17T15:09:39Z+0000",
"type": "Default",
"channel": "Content",
"folder": {
"type": "Folder",
"value": 7685,
"folderName": "US Country Pages"
},
"status": "",
"workspace": "NAM",
"tags": [{
"tagType": "Marketing Campaign",
"tagValue": "EcoBuildings"
}, {
"tagType": "Primary Business",
"tagValue": "All Business Units"
}, {
"tagType": "Primary Country",
"tagValue": "US"
}, {
"tagType": "Primary Market Segmentation",
"tagValue": "All Segments"
}],
"costs": []
}
}
},
lead2:{
"test":"test"
programs:{.......}
}
so on....
}
Yes, you can. All you have to do is create an object and then add new objects with unique IDs. I've included a snippet below. The only constraint here seems to be your RAM.
var allobjects = {};
var sampleObj = {
"First Name": "test",
"Last Name": "test",
"Id": "78354",
"Email Address": "[email protected]",
"FirstLeadSource": "null",
"leadStatus": "Qualified",
"country": "US",
"SEInferredCountry": "null",
"LastProgramSuccess": "null",
"HistoryOfProgramSuccesses": "Dec 14, 2017 : US_All_Contact_Sale",
"programs": {
"program1": {
"id": 1324,
"description": "•\tContent selection LP & TY",
"createdAt": "2015-02-27T15:18:31Z+0000",
"updatedAt": "2017-12-17T15:09:39Z+0000",
"type": "Default",
"channel": "Content",
"folder": {
"type": "Folder",
"value": 7685,
"folderName": "US Country Pages"
},
"status": "",
"workspace": "NAM",
"tags": [{
"tagType": "Marketing Campaign",
"tagValue": "EcoBuildings"
}, {
"tagType": "Primary Business",
"tagValue": "All Business Units"
}, {
"tagType": "Primary Country",
"tagValue": "US"
}, {
"tagType": "Primary Market Segmentation",
"tagValue": "All Segments"
}],
"costs": []
}
}
};
for (var i=0;i<3000000;i++) {
allobjects[("lead"+i)]=Object.create(sampleObj);
}
var count =0;
for (var prop in allobjects) {
count++;
}
console.log("lead count: " + count);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments