Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Change the url for the data you want to parse. And adapt   

Adapt the code below in the file to parse the info you want.information that you want in the JSON file.

By default the code is adapted to parse the file externaldata.json. Adapt this section :

Code Block
$.getJSON(urldatasource,querySolr, function(result){

			$.each(result.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results,
					function(j, docu) {
				var highlightingvalues = docu.Cells.results[10].Value;
				highlightingvalues = replaceAll(highlightingvalues,"<c0>","<span class='em'>");
				highlightingvalues = replaceAll(highlightingvalues,"</c0>","</span>");

				elm.find('.externalresults').append(
						'<div class="external sp'+ j +'"></div>');
				var extension = docu.Cells.results[17].Value;
				elm.find('.external:last').append(
						'<div class="externaltitle"><a class="externallinktitle" target="_blank" href="'+docu.Cells.results[6].Value+'">'+docu.Cells.results[3].Value+'</a>');
				elm.find('.external:last').append('<p class="externalhighlight">'+highlightingvalues);
				elm.find('.external:last').append('<p class="externalurl">'+docu.Cells.results[6].Value);

			})
});


We provide some example data into Datafari if you want to test it out of the box :

...