AnsweredAssumed Answered

get rest service value to html text

Question asked by evansepa on Jan 29, 2016
Latest reply on Feb 9, 2016 by evansepa



I couldn't find info on how to query a rest service to get a value and put it into text on a webpage . . . using js / html


The solution here seems straight forward

jQuery > REST > ParksFinder Bonus?

However I'm looking to grab just one item value... something like this



    $.ajax ( { 

  type: 'GET'

  url: ' **JSVARIABLE** &f=json'

  data: { get_param: 'value' }, 

  dataType: 'json'

  success: function (data) { $.each( data.features, function(index, element) { 

  $('classname').append($('<div>' + element.attributes.CAM_LOCATION + '</div>') );  } ); } } ); 



I think the success parameter configured correctly would give me something useful...?!


Any guidance would be greatly appreciated.