How Can I Copy Part of A JSON File and Paste Code Again With Python?

Is there any way to copy and paste a part of a JSON file and paste it again with Python? I would like to take the Changelog part of my file and copy and past it right above the one below it.

Code I want to copy and paste:

{
  "title": "1.0",
  "useBoldText": true,
  "useBottomMargin": true,
  "class": "DepictionSubheaderView"
},
{
  "markdown": "\t\n\u2022 Initial Release",
  "useSpacing": false,
  "class": "DepictionMarkdownView"
},
{
  "markdown": "<small style=\"color: #999; margin-top: -8px;\">Released 3/7/2019</small>",
  "useRawFormat": true,
  "class": "DepictionMarkdownView"
}

JSON File:

{
  "minVersion": "0.1",
  "headerImage": "",
  "tintColor": "",
  "tabs": [
    {
      "tabname": "Changelog",
      "views": [
        {
          "title": "1.0",
          "useBoldText": true,
          "useBottomMargin": true,
          "class": "DepictionSubheaderView"
        },
        {
          "markdown": "\t\n\u2022 Initial Release",
          "useSpacing": false,
          "class": "DepictionMarkdownView"
        },
        {
          "markdown": "<small style=\"color: #999; margin-top: -8px;\">Released 3/7/2019</small>",
          "useRawFormat": true,
          "class": "DepictionMarkdownView"
        }
      ],
      "class": "DepictionStackView"
    }
  ],
  "class": "DepictionTabView"
}

It should look like this when done:

{
  "minVersion": "0.1",
  "headerImage": "",
  "tintColor": "",
  "tabs": [
    {
      "tabname": "Changelog",
      "views": [
  {
    "title": "1.1",
    "useBoldText": true,
    "useBottomMargin": true,
    "class": "DepictionSubheaderView"
  },
  {
    "markdown": "\t\n\u2022 Some More Changes",
    "useSpacing": false,
    "class": "DepictionMarkdownView"
  },
  {
    "markdown": "&lt;small style=\"color: #999; margin-top: -8px;\"&gt;Released 3/7/19&lt;/small&gt;",
    "useRawFormat": true,
    "class": "DepictionMarkdownView"
  }
 ],

    {
      "title": "1.0",
      "useBoldText": true,
      "useBottomMargin": true,
      "class": "DepictionSubheaderView"
    },
    {
      "markdown": "\t\n\u2022 Initial Release",
      "useSpacing": false,
      "class": "DepictionMarkdownView"
    },
    {
      "markdown": "&lt;small style=\"color: #999; margin-top: -8px;\"&gt;Released 3/1/2019&lt;/small&gt;",
      "useRawFormat": true,
      "class": "DepictionMarkdownView"
    }
  ],

  "class": "DepictionStackView"
}

],
“class”: “DepictionTabView”
}


#python #json

1 Likes20.15 GEEK