JSFiddle - React, Tailwind, and code Playground

by Paul Leech

HTML

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<div id="JSON"></div>
<div id="JSON2"></div>

JavaScript

var obj = jQuery.parseJSON( '{ "name": "John" }' );
alert( obj.name === "John" );
/*
data = { 
   "order_coupon_code":"",
   "order_currency":"USD",
   "order_id":"296668745",
   "order_shipping":"b03bd1cb-04be-49ed-94c9-7c456f07e31d",
   "order_store":"",
   "order_subtotal":"150.280000000000000000",
   "order_tax":"12.020000000",
   "order_type":"",
   "order_total":"162.300000000000000000",
   "product_discount":"0, 0, 0, 0, 0",
   "product_id":"D068, D151, E004, D146, D136",
   "product_name":"NorthShore AirSupreme Tab-Style Briefs, Medium, Pack/15; NorthShore MegaMax Tab-Style Briefs, Large, Pack/10; NorthShore Supreme Heavy-Duty Quilted Wipes, X-Large, Travel Pack, Pack/10; NorthShore DoubleStop XL Male Guards, Pack/14; NorthShore DynaDry Pads, Ultimate, Case/90 (3/30s)",
   "product_sku":"1209, 1279, 1955, 1455, 1410",
   "product_quantity":"2.000000000, 2.000000000, 8.000000000, 1.000000000, 1.000000000",
   "product_list_price":"22.850000000, 24.990000000, 2.290000000, 8.990000000, 43.990000000",
   "product_unit_price":"20.570000000, 22.490000000, 2.060000000, 8.090000000, 39.590000000",
   "site_region":"en",
   "site_currency":"USD",
   "page_name":"Checkout Thank You",
   "page_type":"orderConfirmation",
   "user_status":"[email protected]",
   "OneTrustActiveGroups":"102,1,2,103,118,3,4,120,0_126350,0_126351,0_127444,0_126354,0_127431,0_126353,0_128174,0_127443,0_127434,0_127433,0_126355,0_127432,101,104,105,106,107,109,110,111,112,113,114,115,116,119,121,122,123,124,125,126,129,130,131,132,133,134,135,136,137,138,139,140,141,142"
};
*/
jQuery(function(){
	//$('#JSON').html(data['product_name'][0]);

  /*
  var data = [ 
   {"Id": 10004, "PageName": "club"}, 
   {"Id": 10040, "PageName": "qaz"}, 
   {"Id": 10059, "PageName": "jjjjjjj"}
  ];*/
  //alert(data['product_name']);
  /*
  var pgname = "";
  $.each(data, function(i, item) {
      pgname += data["product_name"][i] + "<br />";
      $('#JSON').html(pgname);
  });
  */
  /*
  var pgname2...