JSFiddle - React, Tailwind, and code Playground

by Zareh Geertjes

JavaScript

$('[id^="bpr-guid-"]').each(function(){
	var txt = $(this).html();
	if ( txt.indexOf('lastName') > 0 ) {
		txt = txt.replace(/"/g,'"');
		var jsonObject = JSON.parse(txt);
		
		if ( !'included' in jsonObject ) {
			return 1;
		}
		
		for (var prop in jsonObject['included'] ) {
			// skip loop if the property is from prototype
			if ( !jsonObject['included'].hasOwnProperty(prop) || !( 'firstName' in jsonObject['included'][prop] ) ) {
				continue;
			} 

			console.log(
				jsonObject['included'][prop].firstName + ' ' + jsonObject['included'][prop].lastName + ' @ ' + jsonObject['included'][prop].occupation,
				jsonObject['included'][prop].picture.rootUrl + jsonObject['included'][prop].picture.artifacts[0].fileIdentifyingUrlPathSegment.replace(/&/g,'&')
			);
		}
    }
});