Pass Array of items to Jquery in or mvc RRS feed

  • Question

  • I have the following array structure in my jquery code hardcoded as follows which is basically map coordinates etc.

     var locations = [
                    ['Petronas Twin Tower','3.1579','101.7116'],
                    ['Kuala Lumpur Tower','3.152866','101.7038'],
                    ['Kuala Lumpur Bird Park','3.14312','101.68835'],
                    ['National Mosque of Malaysia','3.141692','101.691645'],
                    ['Merdeka Square','3.147847','101.693433']

    Obviously the above is hardcoded and I want to be able to do is pass back a dynamic list array, that can be used within my jquery in place of the list above.

    How would I accomplish this using C# in forms or mvc? Thanks

    • Moved by CoolDadTx Thursday, February 1, 2018 3:45 PM ASP.NET related
    Wednesday, January 31, 2018 9:45 PM

All replies