I have a text file with the following content with each line representing a new object. The text file is stored locally on a PC e.g. C:\data.
Name,Role
PersonA,Administrator
PersonB,Engineer
As we are limited to using a session provided by a third party tool, we cannot use reference jQuery libraries or AJAX.
I would like the content to loop through as follows;
var p = {
"PersonA" : "Administrator",
"PersonB" : "Engineer"
};
for (var key in p)
{
if (p.hasOwnProperty(key))
{
client = selectedPackage.Elements.AddNew(key, p[key]);
client.Update();
}
}
How do I reference a complete path e.g. c:\data\roles.txt and have its content loop through?
file://URL? Not sure it would work, but worth a try