I am trying to figure out how to do an C# "function" in javascript but am having no luck!?
Here is the C#:
var parameters = new Dictionary<string,string>
{
{ "link", "http://mysite.com" },
{ "name", "This is an test" }
};
I want to think that I have to use "new Array" but am not sure how to do this?
Any help is appreciated and thanks in advance :-)
Here is a great explanation: JavaScript Associative Arrays Demystified
var parameters = new Array();
parameters['link'] = 'http://mysite.com';
parameters['name'] = 'This is an test';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With