<div id="output"></div>
var objectA = {
  aProperty: 'a value',
  childProperty: {
    aChildProperty: 'a child value'
  }
};

var objectB = JSON.parse(JSON.stringify(objectA));

$('#output').html(JSON.stringify(objectB));

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js