Splitting data from JSON import

Hi there!

I have been fighting this data for some time now, and reached the point of needing some assistance in understanding how to tackle this :slight_smile:

I am importing data about wordpress sites, and i specifically try to make a nice output og every plugin, and their data, version, slug, and so on.

The JSON input looks like this:

{
"id": "256125",
"userid": "1",
"adminname": "AUTHUSER",
"name": "testing-domain.dk",
"url": "https://testing-domain.dk/",
"pubkey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCZXkvV2Ezd1pGSmM1VXNFL1B6QmkyK24vUnJacC8KRFFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==",
"nossl": "0",
"nosslkey": "5ea86875191.5543",
"siteurl": "https://testing-domain.dk",
"ga_id": "",
"gas_id": "0",
"offline_checks_last": "1624532378",
"offline_check_result": "1",
"http_response_code": "200",
"note": "",
"note_lastupdate": "0",
"statsUpdate": "16040458",
"directories": "{\"wp-content\":{\"mu-plugins\":null,\"revslider\":{\"admin\":null,\"includes\":null,\"languages\":null,\"public\":null,\"backup\":null},\"upgrade\":null,\"languages\":{\"themes\":null,\"plugins\":null},\"themes\":{\"twentynineteen\":null,\"megalith\":null,\"twentyseventeen\":null,\"twentytwenty\":null},\"uploads\":{\"mainwp\":null,\"2016\":null,\"revslider\":null,\"js_composer\":null,\"2021\":null,\"wp-migrate-db\":null,\"2019\":null,\"2020\":null,\"2018\":null,\"2017\":null},\"plugins\":{\"wp-mail-smtp\":null,\"mainwp-child\":null,\"captcha-bank-pro-edition_\":null,\"login-lockdown\":null,\"simple-contact-info\":null,\"contact-form-7\":null,\"really-simple-ssl_\":null,\"revslider\":null,\"wp-statistics\":null,\"js_composer\":null}},\"wp-admin\":{\"user\":null,\"network\":null,\"includes\":null,\"css\":{\"colors\":null},\"images\":null,\"maint\":null,\"js\":{\"widgets\":null}},\"wp-includes\":{\"customize\":null,\"Text\":{\"Diff\":null},\"assets\":null,\"sitemaps\":{\"providers\":null},\"SimplePie\":{\"HTTP\":null,\"Content\":null,\"Parse\":null,\"Net\":null,\"Cache\":null,\"XML\":null,\"Decode\":null},\"rest-api\":{\"search\":null,\"fields\":null,\"endpoints\":null},\"random_compat\":null,\"IXR\":null,\"ID3\":null,\"theme-compat\":null}}",
"plugin_upgrades": "{\"akismet\\/akismet.php\":{\"Name\":\"Akismet Anti-Spam\",\"PluginURI\":\"https:\\/\\/akismet.com\\/\",\"Version\":\"4.1.6\",\"Description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"Author\":\"Automattic\",\"AuthorURI\":\"https:\\/\\/automattic.com\\/wordpress-plugins\\/\",\"TextDomain\":\"akismet\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Akismet Anti-Spam\",\"AuthorName\":\"Automattic\",\"update\":{\"id\":\"w.org\\/plugins\\/akismet\",\"slug\":\"akismet\",\"plugin\":\"akismet\\/akismet.php\",\"new_version\":\"4.1.10\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/akismet\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/akismet.4.1.10.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-256x256.png?rev=969272\",\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-128x128.png?rev=969272\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/banner-772x250.jpg?rev=479904\"},\"banners_rtl\":[],\"tested\":\"5.8\",\"requires_php\":false,\"compatibility\":[]},\"active\":0},\"contact-form-7\\/wp-contact-form-7.php\":{\"Name\":\"Contact Form 7\",\"PluginURI\":\"https:\\/\\/contactform7.com\\/\",\"Version\":\"5.2.1\",\"Description\":\"Just another contact form plugin. Simple but flexible.\",\"Author\":\"Takayuki Miyoshi\",\"AuthorURI\":\"https:\\/\\/ideasilo.wordpress.com\\/\",\"TextDomain\":\"contact-form-7\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Contact Form 7\",\"AuthorName\":\"Takayuki Miyoshi\",\"update\":{\"id\":\"w.org\\/plugins\\/contact-form-7\",\"slug\":\"contact-form-7\",\"plugin\":\"contact-form-7\\/wp-contact-form-7.php\",\"new_version\":\"5.4.1\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/contact-form-7\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/contact-form-7.5.4.1.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon-256x256.png?rev=2279696\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\",\"svg\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-1544x500.png?rev=860901\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-772x250.png?rev=880427\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":false,\"compatibility\":[]},\"active\":1},\"disable-comments\\/disable-comments.php\":{\"Name\":\"Disable Comments\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"Version\":\"2.0.2\",\"Description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"Author\":\"WPDeveloper\",\"AuthorURI\":\"https:\\/\\/wpdeveloper.net\",\"TextDomain\":\"disable-comments\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Disable Comments\",\"AuthorName\":\"WPDeveloper\",\"update\":{\"id\":\"w.org\\/plugins\\/disable-comments\",\"slug\":\"disable-comments\",\"plugin\":\"disable-comments\\/disable-comments.php\",\"new_version\":\"2.1.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/disable-comments.2.1.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-256x256.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-128x128.png?rev=2509854\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-1544x500.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-772x250.png?rev=2509854\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"mainwp-child\\/mainwp-child.php\":{\"Name\":\"MainWP Child\",\"PluginURI\":\"https:\\/\\/mainwp.com\\/\",\"Version\":\"4.1.2\",\"Description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"Author\":\"MainWP\",\"AuthorURI\":\"https:\\/\\/mainwp.com\",\"TextDomain\":\"mainwp-child\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"3.6\",\"RequiresPHP\":\"5.6\",\"Title\":\"MainWP Child\",\"AuthorName\":\"MainWP\",\"update\":{\"id\":\"w.org\\/plugins\\/mainwp-child\",\"slug\":\"mainwp-child\",\"plugin\":\"mainwp-child\\/mainwp-child.php\",\"new_version\":\"4.1.7\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mainwp-child\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mainwp-child.4.1.7.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/icon-128x128.png?rev=2147214\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250.jpg?rev=2150284\"},\"banners_rtl\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500-rtl.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250-rtl.jpg?rev=2150284\"},\"tested\":\"5.7.2\",\"requires_php\":\"7.0\",\"compatibility\":[]},\"active\":1},\"mobile-menu\\/mobmenu.php\":{\"Name\":\"Mobile Menu\",\"PluginURI\":\"https:\\/\\/www.wpmobilemenu.com\\/\",\"Version\":\"2.8.1.8.1\",\"Description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"Author\":\"Rui Guerreiro\",\"AuthorURI\":\"https:\\/\\/www.jedipress.com\\/\",\"TextDomain\":\"mobile-menu\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Mobile Menu\",\"AuthorName\":\"Rui Guerreiro\",\"update\":{\"id\":\"w.org\\/plugins\\/mobile-menu\",\"slug\":\"mobile-menu\",\"plugin\":\"mobile-menu\\/mobmenu.php\",\"new_version\":\"2.8.2.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mobile-menu\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mobile-menu.2.8.2.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/icon-128x128.png?rev=1890426\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/banner-772x250.jpg?rev=1976792\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\":{\"Name\":\"Really Simple SSL\",\"PluginURI\":\"https:\\/\\/www.really-simple-ssl.com\",\"Version\":\"3.3.4\",\"Description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"Author\":\"Really Simple Plugins\",\"AuthorURI\":\"https:\\/\\/really-simple-plugins.com\",\"TextDomain\":\"really-simple-ssl\",\"DomainPath\":\"\\/languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Really Simple SSL\",\"AuthorName\":\"Really Simple Plugins\",\"update\":{\"id\":\"w.org\\/plugins\\/really-simple-ssl\",\"slug\":\"really-simple-ssl\",\"plugin\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"new_version\":\"5.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/really-simple-ssl\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/really-simple-ssl.5.0.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/icon-128x128.png?rev=1782452\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-1544x500.png?rev=2320223\",\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-772x250.png?rev=2320228\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":0},\"js_composer\\/js_composer.php\":{\"Name\":\"WPBakery Page Builder\",\"PluginURI\":\"http:\\/\\/wpbakery.com\",\"Version\":\"6.3.0\",\"Description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"Author\":\"Michael M - WPBakery.com\",\"AuthorURI\":\"http:\\/\\/wpbakery.com\",\"TextDomain\":\"js_composer\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WPBakery Page Builder\",\"AuthorName\":\"Michael M - WPBakery.com\",\"update\":{\"slug\":\"js_composer\",\"new_version\":\"6.7\",\"plugin\":\"js_composer\\/js_composer.php\",\"url\":\"\",\"package\":false,\"name\":null},\"active\":1},\"wp-mail-smtp\\/wp_mail_smtp.php\":{\"Name\":\"WP Mail SMTP\",\"PluginURI\":\"https:\\/\\/wpmailsmtp.com\\/\",\"Version\":\"2.8.0\",\"Description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"Author\":\"WPForms\",\"AuthorURI\":\"https:\\/\\/wpforms.com\\/\",\"TextDomain\":\"wp-mail-smtp\",\"DomainPath\":\"\\/assets\\/languages\",\"Network\":false,\"RequiresWP\":\"4.9\",\"RequiresPHP\":\"5.6.20\",\"Title\":\"WP Mail SMTP\",\"AuthorName\":\"WPForms\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-mail-smtp\",\"slug\":\"wp-mail-smtp\",\"plugin\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"new_version\":\"2.9.0\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-mail-smtp\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-mail-smtp.2.9.0.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-256x256.png?rev=1755440\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-128x128.png?rev=1755440\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-1544x500.png?rev=2468655\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-772x250.png?rev=2468655\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6.20\",\"compatibility\":[]},\"active\":1},\"wp-migrate-db\\/wp-migrate-db.php\":{\"Name\":\"WP Migrate DB\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"Version\":\"1.0.15\",\"Description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"Author\":\"Delicious Brains\",\"AuthorURI\":\"https:\\/\\/deliciousbrains.com\",\"TextDomain\":\"wp-migrate-db\",\"DomainPath\":\"\\/languages\\/\",\"Network\":true,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Migrate DB\",\"AuthorName\":\"Delicious Brains\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-migrate-db\",\"slug\":\"wp-migrate-db\",\"plugin\":\"wp-migrate-db\\/wp-migrate-db.php\",\"new_version\":\"2.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-migrate-db.2.0.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-256x256.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-128x128.jpg?rev=1809889\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-1544x500.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-772x250.jpg?rev=1809889\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"wp-statistics\\/wp-statistics.php\":{\"Name\":\"WP Statistics\",\"PluginURI\":\"https:\\/\\/wp-statistics.com\\/\",\"Version\":\"12.6.13\",\"Description\":\"Complete WordPress Analytics and Statistics for your site!\",\"Author\":\"VeronaLabs\",\"AuthorURI\":\"http:\\/\\/veronalabs.com\\/\",\"TextDomain\":\"wp-statistics\",\"DomainPath\":\"languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Statistics\",\"AuthorName\":\"VeronaLabs\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-statistics\",\"slug\":\"wp-statistics\",\"plugin\":\"wp-statistics\\/wp-statistics.php\",\"new_version\":\"13.0.8\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-statistics\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-statistics.13.0.8.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon-256x256.png?rev=1673578\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\",\"svg\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/banner-772x250.png?rev=2041108\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1}}",
"theme_upgrades": "{\"twentynineteen\":{\"update\":{\"theme\":\"twentynineteen\",\"new_version\":\"2.0\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentynineteen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentynineteen.2.0.zip\",\"requires\":\"4.9.6\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Nineteen\",\"Version\":\"1.7\",\"active\":0},\"twentyseventeen\":{\"update\":{\"theme\":\"twentyseventeen\",\"new_version\":\"2.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentyseventeen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentyseventeen.2.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Seventeen\",\"Version\":\"2.4\",\"active\":0},\"twentytwenty\":{\"update\":{\"theme\":\"twentytwenty\",\"new_version\":\"1.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentytwenty\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentytwenty.1.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Twenty\",\"Version\":\"1.5\",\"active\":0}}",
"translation_upgrades": "[]",
"premium_upgrades": "",
"securityIssues": "0",
"themes": "[{\"name\":\"Megalith\",\"title\":\"Megalith\",\"description\":\"Creative Multipurpose HTML Template\",\"version\":\"1.2.12\",\"active\":1,\"slug\":\"megalith\"},{\"name\":\"Twenty Nineteen\",\"title\":\"Twenty Nineteen\",\"description\":\"Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you&#8217;ll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you\\u2019re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it&#8217;s built to be beautiful on all screen sizes.\",\"version\":\"1.7\",\"active\":0,\"slug\":\"twentynineteen\"},{\"name\":\"Twenty Seventeen\",\"title\":\"Twenty Seventeen\",\"description\":\"Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.\",\"version\":\"2.4\",\"active\":0,\"slug\":\"twentyseventeen\"},{\"name\":\"Twenty Twenty\",\"title\":\"Twenty Twenty\",\"description\":\"Our default theme for 2020 is designed to take full advantage of the flexibility of the block editor. Organizations and businesses have the ability to create dynamic landing pages with endless layouts using the group and column blocks. The centered content column and fine-tuned typography also makes it perfect for traditional blogs. Complete editor styles give you a good idea of what your content will look like, even before you publish. You can give your site a personal touch by changing the background colors and the accent color in the Customizer. The colors of all elements on your site are automatically calculated based on the colors you pick, ensuring a high, accessible color contrast for your visitors.\",\"version\":\"1.5\",\"active\":0,\"slug\":\"twentytwenty\"}]",
"ignored_themes": "",
"plugins": "[{\"mainwp\":\"F\",\"name\":\"Akismet Anti-Spam\",\"slug\":\"akismet\\/akismet.php\",\"description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"version\":\"4.1.6\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Captcha Bank Pro Edition\",\"slug\":\"captcha-bank-pro-edition_\\/captcha-bank-pro-edition.php\",\"description\":\"This plugin allows you to implement security captcha form into web forms to prevent spam.\",\"version\":\"4.1.34\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Contact Form 7\",\"slug\":\"contact-form-7\\/wp-contact-form-7.php\",\"description\":\"Just another contact form plugin. Simple but flexible.\",\"version\":\"5.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Custom Facebook Feed Pro Developer\",\"slug\":\"custom-facebook-feed-pro\\/custom-facebook-feed.php\",\"description\":\"Add a completely customizable Facebook feed to your WordPress site\",\"version\":\"2.6.7\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Dashboard Cleanup\",\"slug\":\"dashboard-cleanup\\/dashboard-cleanup.php\",\"description\":\"Remove options include wordpress.org feed, recent drafts, right now, recent comments, incoming links, plugins box, quick press. See readme.txt before activating!\",\"version\":\"1.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Disable Comments\",\"slug\":\"disable-comments\\/disable-comments.php\",\"description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"version\":\"2.0.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Login LockDown\",\"slug\":\"login-lockdown\\/loginlockdown.php\",\"description\":\"Adds some extra security to WordPress by restricting the rate at which failed logins can be re-attempted from a given IP range. Distributed through <a href=\\\"http:\\/\\/www.bad-neighborhood.com\\/\\\" target=\\\"_blank\\\">Bad Neighborhood<\\/a>.\",\"version\":\"v1.8.1\",\"active\":1},{\"mainwp\":\"T\",\"name\":\"MainWP Child\",\"slug\":\"mainwp-child\\/mainwp-child.php\",\"description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"version\":\"4.1.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Mobile Menu\",\"slug\":\"mobile-menu\\/mobmenu.php\",\"description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"version\":\"2.8.1.8.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Really Simple SSL\",\"slug\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"version\":\"3.3.4\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Simple Contact Info\",\"slug\":\"simple-contact-info\\/contact-info.php\",\"description\":\"You can write contact information (facebook, phone, fax, address etc). You can use widgets or shortcode to display it anywhere you want.\",\"version\":\"1.1.9\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Slider Revolution\",\"slug\":\"revslider\\/revslider.php\",\"description\":\"Slider Revolution - Premium responsive slider\",\"version\":\"6.2.22\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"TeslaThemes Megalith posts\",\"slug\":\"teslathemes-custom-posts\\/teslathemes-custom-posts.php\",\"description\":\"Teslathemes custom posts\",\"version\":\"1.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WPBakery Page Builder\",\"slug\":\"js_composer\\/js_composer.php\",\"description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"version\":\"6.3.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Mail SMTP\",\"slug\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"version\":\"2.8.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB\",\"slug\":\"wp-migrate-db\\/wp-migrate-db.php\",\"description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"version\":\"1.0.15\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Statistics\",\"slug\":\"wp-statistics\\/wp-statistics.php\",\"description\":\"Complete WordPress Analytics and Statistics for your site!\",\"version\":\"12.6.13\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB Compatibility\",\"slug\":\"wp-migrate-db-pro-compatibility.php\",\"description\":\"Prevents 3rd party plugins from being loaded during WP Migrate DB specific operations\",\"version\":\"1.2\",\"active\":1,\"mu\":1}]",
"ignored_plugins": "",
"pages": "",
"users": "[]",
"categories": "[\"Ikke kategoriseret\"]",
"pluginDir": "",
"automatic_update": "0",
"backup_before_upgrade": "2",
"backups": "",
"mainwpdir": "1",
"loadFilesBeforeZip": "0",
"is_ignoreCoreUpdates": "0",
"is_ignorePluginUpdates": "0",
"is_ignoreThemeUpdates": "0",
"verify_certificate": "0",
"force_use_ipv4": "0",
"ssl_version": "0",
"ip": "",
"uniqueId": "",
"maximumFileDescriptorsOverride": "0",
"maximumFileDescriptorsAuto": "0",
"maximumFileDescriptors": "150",
"http_user": "",
"http_pass": "",
"wpe": "0",
"is_staging": "0",
"http_code_noticed": "1",
"disable_status_check": "0",
"disable_health_check": "0",
"status_check_interval": "0",
"health_threshold": "0",
"wpid": "25",
"version": "4.1.2",
"sync_errors": "",
"dtsAutomaticSync": "1606560962",
"dtsAutomaticSyncStart": "1606560951",
"dtsSync": "1626071493",
"dtsSyncStart": "1626071489",
"totalsize": "0",
"dbsize": "5144676",
"extauth": "8a78cd60e9bea8a308df",
"last_post_gmt": "0",
"health_value": "80",
"health_site_noticed": "0",
"uptodate": "",
"sync_id": "12",
"recent_comments": "[]",
"recent_posts": "[]",
"recent_pages": "[{\"id\":57,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Kontakt\",\"comment_count\":\"0\",\"dts\":1475134637,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":54,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Galleri\",\"comment_count\":\"0\",\"dts\":1472799173,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":51,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Datalogger\",\"comment_count\":\"0\",\"dts\":1546500587,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":48,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Milj\\u00f8udstyr\",\"comment_count\":\"0\",\"dts\":1546500523,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":45,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Diverse ure\",\"comment_count\":\"0\",\"dts\":1546500398,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"}]",
"phpversion": "7.4.21",
"wp_upgrades": "{\"current\":\"5.5.5\",\"new\":\"5.7.2\"}",
"favi_icon": "favi-25-favicon.ico"
}

I have already made a separation, so i only get the plugin part.
This just done with this script:


    
$cosandsec = "consumer_key=ck_SECRET&consumer_secret=cs_SECRET"
    
    
$FileList = (Get-ChildItem 'C:\Users\jtn\Desktop\PS2020\MainWP\full-plugin-version\input\input.txt').fullname
$c1 = 0
    
$m = Get-Content -Path $FileList | Measure-Object -line
@($m).lines
    
$myOutput = @() # Declare empty array
Write-host "websiteid,pluginname" 
foreach ($listedid in $FileList) {

    
    $myOutput += foreach ($websiteid in (Get-Content $listedid)) {
    
        try {

            $c1++
            Write-Progress -Id 0 -Activity 'Running theme scan' -Status "Processing $($c1) of $(@($m).lines)" -CurrentOperation $websiteid -PercentComplete (($c1 / @($m).lines) * 100)

            $Url = "https://mainwpdashboard.dk/wp-json/mainwp/v1/site/site?site_id=$($websiteid)&$($cosandsec)"
            $updateprocess = Invoke-RestMethod -Method 'Get' -Uri $url


            foreach ($line in $updateprocess) {
                write-host "$websiteid,$websitename"


            
                $websitename = $line.name
                $plugins = $line.plugins 

                write-host $plugins


                # Something similar to this??

                # foreach ($soloplugin in  $plugins) {

                #   write-host $plugins.name

                #   write-host $plugins.version

                #  }

               
            }

            [PSCustomObject]@{
                websiteid              = $websiteid
                websitenameurl         = $websitename
                plugins                = $plugins
                Exceptionmessage       = $updateProcess.success
                StatusdescriptionValue = '200'
                Statusdescription      = 'SUCCESS'
            }
    
        }
        catch {
            # catcherrors
            [PSCustomObject]@{
                websiteid              = $websiteid
                websitenameurl         = $websitename
                Exceptionmessage       = $_.Exception.Message
                StatusdescriptionValue = $_.Exception.Response.StatusCode.value__ 
                Statusdescription      = $_.Exception.Response.StatusDescription


            }
        }
    }
}
    
    
    
    
$myOutput | Select-Object  -Property websiteid,
websitenameurl,
Exceptionmessage,
Exceptionresponse,
StatusdescriptionValue,
Statusdescription |
    
Export-Csv -NoTypeInformation -Path C:\Users\jtn\Desktop\PS2020\MainWP\full-plugin-version\output\output.csv
# or 
$myOutput | Out-GridView

This then gives me this for now:

[{"mainwp":"F","name":"Contact Form 7","slug":"contact-form-7\/wp-contact-form-7.php","description":"Just another contact form plugin. Simple but flexible.","version":"5.1.4","active":0},{"mainwp":"F","name":"Coo
kie Bar","slug":"cookie-bar\/cookie-bar.php","description":"Cookie Bar allows you to discreetly inform visitors that your website uses cookies.","version":"1.8.6","active":0},{"mainwp":"F","name":"Custom Facebook
 Feed Pro Developer","slug":"custom-facebook-feed-pro\/custom-facebook-feed.php","description":"Add a completely customizable Facebook feed to your WordPress site","version":"3.2.4","active":1},{"mainwp":"F","nam
e":"Disable Comments","slug":"disable-comments\/disable-comments.php","description":"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type.","version":"
1.7.1","active":1},{"mainwp":"F","name":"Envira Gallery","slug":"envira-gallery\/envira-gallery.php","description":"Envira Gallery is best responsive WordPress gallery plugin.","version":"1.7.1","active":1},{"mai
nwp":"F","name":"Export & Import Templates for WPBakery Page Builder","slug":"vc-templates-import-export\/vc-templates-import-export.php","description":"Export & Import Templates for WPBakery Page Builder (Saved 
Templates\/My Templates) in few clicks","version":"1.0.0","active":1},{"mainwp":"F","name":"Insert Headers and Footers","slug":"insert-headers-and-footers\/ihaf.php","description":"Allows you to insert code or te
xt in the header or footer of your WordPress blog","version":"1.4.4","active":1},{"mainwp":"F","name":"Loco Translate","slug":"loco-translate\/loco.php","description":"Translate themes and plugins directly in Wor
dPress","version":"2.3.1","active":1},{"mainwp":"F","name":"Login LockDown","slug":"login-lockdown\/loginlockdown.php","description":"Adds some extra security to WordPress by restricting the rate at which failed 
logins can be re-attempted from a given IP range. Distributed through <a href=\"http:\/\/www.bad-neighborhood.com\/\" target=\"_blank\">Bad Neighborhood<\/a>.","version":"v1.8.1","active":1},{"mainwp":"T","name":
"MainWP Child","slug":"mainwp-child\/mainwp-child.php","description":"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central loc
ation. Plugin documentation and options can be found here https:\/\/mainwp.com\/help\/.","version":"4.1.2","active":1},{"mainwp":"F","name":"Mobile Menu","slug":"mobile-menu\/mobmenu.php","description":"An easy t
o use WordPress responsive mobile menu. Keep your mobile visitors engaged.","version":"2.7.4.4","active":1},{"mainwp":"F","name":"Ninja Forms","slug":"ninja-forms\/ninja-forms.php","description":"Ninja Forms is a
 webform builder with unparalleled ease of use and features.","version":"3.2.14","active":1},{"mainwp":"F","name":"Simple 301 Redirects","slug":"simple-301-redirects\/wp-simple-301-redirects.php","description":"C
reate a list of URLs that you would like to 301 redirect to another page or site. Now with wildcard support.","version":"1.07","active":1},{"mainwp":"F","name":"Slider Revolution","slug":"revslider\/revslider.php
","description":"Slider Revolution - Premium responsive slider","version":"6.2.22","active":1},{"mainwp":"F","name":"SVG Support","slug":"svg-support\/svg-support.php","description":"Upload SVG files to the Media
 Library and render SVG files inline for direct styling\/animation of an SVG's internal elements using CSS\/JS.","version":"2.3.15","active":1},{"mainwp":"F","name":"Tesla Framework","slug":"tesla-framework\/tesl
a-framework-plugin.php","description":"Tesla Framework","version":"1.2.5","active":1},{"mainwp":"F","name":"TeslaThemes Megalith posts","slug":"teslathemes-custom-posts\/teslathemes-custom-posts.php","description
":"Teslathemes custom posts","version":"1.2.1","active":1},{"mainwp":"F","name":"Ultimate Addons for Visual Composer","slug":"Ultimate_VC_Addons\/Ultimate_VC_Addons.php","description":"Includes Visual Composer pr
emium addon elements like Icon, Info Box, Interactive Banner, Flip Box, Info List & Counter. Best of all - provides A Font Icon Manager allowing users to upload \/ delete custom icon fonts.","version":"3.16.21","
active":1},{"mainwp":"F","name":"WooCommerce","slug":"woocommerce\/woocommerce.php","description":"An eCommerce toolkit that helps you sell anything. Beautifully.","version":"3.8.0","active":0},{"mainwp":"F","nam
e":"WPBakery Page Builder","slug":"js_composer\/js_composer.php","description":"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \u2013 no pro
gramming knowledge required.","version":"6.3.0","active":1},{"mainwp":"F","name":"WP Mail SMTP","slug":"wp-mail-smtp\/wp_mail_smtp.php","description":"Reconfigures the <code>wp_mail()<\/code> function to use Gmai
l\/Mailgun\/SendGrid\/SMTP instead of the default <code>mail()<\/code> and creates an options page to manage the settings.","version":"2.4.0","active":1},{"mainwp":"F","name":"WP Statistics","slug":"wp-statistics
\/wp-statistics.php","description":"Complete WordPress Analytics and Statistics for your site!","version":"12.6.10","active":1}]

What i cant seem to figure out, is how i split these individual plugins and their information from here.
I have tried to convert to objects, split, and so forth with strange results.

Every plugin is packed inside curly brackers, and the name and value split between “:” and commas. “{ info }”.

I’m guessing it should be relatively straight forward to make these plugins and their information into objects that can be handled like json again?
So that “slug” can be picked with $plugins.slug and so on.

I really hope someone can help me out here, i am lost :stuck_out_tongue:

Have you tried using ConvertFrom-JSON ?

$myNewObject = ConvertFrom-JSON -InputObject $updaterocess

Hey Tonyd!

I tried that, but got a null error.

I tried something a bit else now, which ALMOST works.

I corrected the section like so:

$Url = "https://wk-kontrol.dk/wp-json/mainwp/v1/site/site?site_id=$($websiteid)&$($cosandsec)"
            $updateprocess = Invoke-RestMethod -Method 'Get' -Uri $url


            foreach ($line in $updateprocess) {
                write-host "$websiteid,$websitename"


            
                $websitename = $line.name
                $plugins = $line.plugins | ConvertFrom-JSON

                
  
                write-host "THIS IS THE DOMAIN ID" - $websiteid
                write-host "this is the writeout = " $plugins.name $plugins.version
                

This gives me this output:

THIS IS THE DOMAIN ID - 1360
this is the writeout =  Disable Comments Envira Gallery GDPR Cookie Compliance (CCPA, PIPEDA ready) Imagify Insert Headers and Footers Loco Translate MainWP C
hild Meta Box Ninja Forms Optimus Redux Simple 301 Redirects Slider Revolution SVG Support Swift Framework Ultimate Addons for WPBakery Page Builder VC Templa
tes Import & Export WPBakery Page Builder WP Mail SMTP WP Rocket WP Statistics Yoast Duplicate Post Yoast SEO 2.1.1 1.9.3.6 4.5.6 1.9.14 1.6.0 2.5.2 4.1.6.1 5
.4.1 3.5.5 1.6.1 4.1.26 2.0.4 6.4.6 2.3.18 2.7.31 3.19.10 1.0.0 6.6.0 2.8.0 3.8.8 13.0.8 4.1.2 16.4

Which, in some sense, is the correct stuff i want.

Problem just is, the structure is kind of a mess.

I would want it to come out like:
( Plugin name - plugin version )
Code Snippets - 2.14.1
Disable Comments - 2.1.1

So that a list can be made that makes somewhat more sense.

I added the convertFrom-JSON to the line-plugins, that this is the only part needed “treatment” so to say.

Do you have an idea on how to be able to split the output as a “foreach” thing?

As far as i can see, the entire “chunk” of plugins is still treated as a single object.
I tried | Select-Object -first 1 so check, which still just gives me everything, not just the first plugin name and version.

How about this:

$JSON = @'
{
"id": "256125",
"userid": "1",
"adminname": "AUTHUSER",
"name": "testing-domain.dk",
"url": "https://testing-domain.dk/",
"pubkey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCZXkvV2Ezd1pGSmM1VXNFL1B6QmkyK24vUnJacC8KRFFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==",
"nossl": "0",
"nosslkey": "5ea86875191.5543",
"siteurl": "https://testing-domain.dk",
"ga_id": "",
"gas_id": "0",
"offline_checks_last": "1624532378",
"offline_check_result": "1",
"http_response_code": "200",
"note": "",
"note_lastupdate": "0",
"statsUpdate": "16040458",
"directories": "{\"wp-content\":{\"mu-plugins\":null,\"revslider\":{\"admin\":null,\"includes\":null,\"languages\":null,\"public\":null,\"backup\":null},\"upgrade\":null,\"languages\":{\"themes\":null,\"plugins\":null},\"themes\":{\"twentynineteen\":null,\"megalith\":null,\"twentyseventeen\":null,\"twentytwenty\":null},\"uploads\":{\"mainwp\":null,\"2016\":null,\"revslider\":null,\"js_composer\":null,\"2021\":null,\"wp-migrate-db\":null,\"2019\":null,\"2020\":null,\"2018\":null,\"2017\":null},\"plugins\":{\"wp-mail-smtp\":null,\"mainwp-child\":null,\"captcha-bank-pro-edition_\":null,\"login-lockdown\":null,\"simple-contact-info\":null,\"contact-form-7\":null,\"really-simple-ssl_\":null,\"revslider\":null,\"wp-statistics\":null,\"js_composer\":null}},\"wp-admin\":{\"user\":null,\"network\":null,\"includes\":null,\"css\":{\"colors\":null},\"images\":null,\"maint\":null,\"js\":{\"widgets\":null}},\"wp-includes\":{\"customize\":null,\"Text\":{\"Diff\":null},\"assets\":null,\"sitemaps\":{\"providers\":null},\"SimplePie\":{\"HTTP\":null,\"Content\":null,\"Parse\":null,\"Net\":null,\"Cache\":null,\"XML\":null,\"Decode\":null},\"rest-api\":{\"search\":null,\"fields\":null,\"endpoints\":null},\"random_compat\":null,\"IXR\":null,\"ID3\":null,\"theme-compat\":null}}",
"plugin_upgrades": "{\"akismet\\/akismet.php\":{\"Name\":\"Akismet Anti-Spam\",\"PluginURI\":\"https:\\/\\/akismet.com\\/\",\"Version\":\"4.1.6\",\"Description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"Author\":\"Automattic\",\"AuthorURI\":\"https:\\/\\/automattic.com\\/wordpress-plugins\\/\",\"TextDomain\":\"akismet\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Akismet Anti-Spam\",\"AuthorName\":\"Automattic\",\"update\":{\"id\":\"w.org\\/plugins\\/akismet\",\"slug\":\"akismet\",\"plugin\":\"akismet\\/akismet.php\",\"new_version\":\"4.1.10\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/akismet\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/akismet.4.1.10.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-256x256.png?rev=969272\",\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-128x128.png?rev=969272\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/banner-772x250.jpg?rev=479904\"},\"banners_rtl\":[],\"tested\":\"5.8\",\"requires_php\":false,\"compatibility\":[]},\"active\":0},\"contact-form-7\\/wp-contact-form-7.php\":{\"Name\":\"Contact Form 7\",\"PluginURI\":\"https:\\/\\/contactform7.com\\/\",\"Version\":\"5.2.1\",\"Description\":\"Just another contact form plugin. Simple but flexible.\",\"Author\":\"Takayuki Miyoshi\",\"AuthorURI\":\"https:\\/\\/ideasilo.wordpress.com\\/\",\"TextDomain\":\"contact-form-7\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Contact Form 7\",\"AuthorName\":\"Takayuki Miyoshi\",\"update\":{\"id\":\"w.org\\/plugins\\/contact-form-7\",\"slug\":\"contact-form-7\",\"plugin\":\"contact-form-7\\/wp-contact-form-7.php\",\"new_version\":\"5.4.1\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/contact-form-7\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/contact-form-7.5.4.1.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon-256x256.png?rev=2279696\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\",\"svg\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-1544x500.png?rev=860901\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-772x250.png?rev=880427\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":false,\"compatibility\":[]},\"active\":1},\"disable-comments\\/disable-comments.php\":{\"Name\":\"Disable Comments\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"Version\":\"2.0.2\",\"Description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"Author\":\"WPDeveloper\",\"AuthorURI\":\"https:\\/\\/wpdeveloper.net\",\"TextDomain\":\"disable-comments\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Disable Comments\",\"AuthorName\":\"WPDeveloper\",\"update\":{\"id\":\"w.org\\/plugins\\/disable-comments\",\"slug\":\"disable-comments\",\"plugin\":\"disable-comments\\/disable-comments.php\",\"new_version\":\"2.1.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/disable-comments.2.1.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-256x256.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-128x128.png?rev=2509854\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-1544x500.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-772x250.png?rev=2509854\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"mainwp-child\\/mainwp-child.php\":{\"Name\":\"MainWP Child\",\"PluginURI\":\"https:\\/\\/mainwp.com\\/\",\"Version\":\"4.1.2\",\"Description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"Author\":\"MainWP\",\"AuthorURI\":\"https:\\/\\/mainwp.com\",\"TextDomain\":\"mainwp-child\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"3.6\",\"RequiresPHP\":\"5.6\",\"Title\":\"MainWP Child\",\"AuthorName\":\"MainWP\",\"update\":{\"id\":\"w.org\\/plugins\\/mainwp-child\",\"slug\":\"mainwp-child\",\"plugin\":\"mainwp-child\\/mainwp-child.php\",\"new_version\":\"4.1.7\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mainwp-child\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mainwp-child.4.1.7.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/icon-128x128.png?rev=2147214\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250.jpg?rev=2150284\"},\"banners_rtl\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500-rtl.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250-rtl.jpg?rev=2150284\"},\"tested\":\"5.7.2\",\"requires_php\":\"7.0\",\"compatibility\":[]},\"active\":1},\"mobile-menu\\/mobmenu.php\":{\"Name\":\"Mobile Menu\",\"PluginURI\":\"https:\\/\\/www.wpmobilemenu.com\\/\",\"Version\":\"2.8.1.8.1\",\"Description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"Author\":\"Rui Guerreiro\",\"AuthorURI\":\"https:\\/\\/www.jedipress.com\\/\",\"TextDomain\":\"mobile-menu\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Mobile Menu\",\"AuthorName\":\"Rui Guerreiro\",\"update\":{\"id\":\"w.org\\/plugins\\/mobile-menu\",\"slug\":\"mobile-menu\",\"plugin\":\"mobile-menu\\/mobmenu.php\",\"new_version\":\"2.8.2.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mobile-menu\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mobile-menu.2.8.2.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/icon-128x128.png?rev=1890426\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/banner-772x250.jpg?rev=1976792\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\":{\"Name\":\"Really Simple SSL\",\"PluginURI\":\"https:\\/\\/www.really-simple-ssl.com\",\"Version\":\"3.3.4\",\"Description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"Author\":\"Really Simple Plugins\",\"AuthorURI\":\"https:\\/\\/really-simple-plugins.com\",\"TextDomain\":\"really-simple-ssl\",\"DomainPath\":\"\\/languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Really Simple SSL\",\"AuthorName\":\"Really Simple Plugins\",\"update\":{\"id\":\"w.org\\/plugins\\/really-simple-ssl\",\"slug\":\"really-simple-ssl\",\"plugin\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"new_version\":\"5.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/really-simple-ssl\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/really-simple-ssl.5.0.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/icon-128x128.png?rev=1782452\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-1544x500.png?rev=2320223\",\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-772x250.png?rev=2320228\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":0},\"js_composer\\/js_composer.php\":{\"Name\":\"WPBakery Page Builder\",\"PluginURI\":\"http:\\/\\/wpbakery.com\",\"Version\":\"6.3.0\",\"Description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"Author\":\"Michael M - WPBakery.com\",\"AuthorURI\":\"http:\\/\\/wpbakery.com\",\"TextDomain\":\"js_composer\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WPBakery Page Builder\",\"AuthorName\":\"Michael M - WPBakery.com\",\"update\":{\"slug\":\"js_composer\",\"new_version\":\"6.7\",\"plugin\":\"js_composer\\/js_composer.php\",\"url\":\"\",\"package\":false,\"name\":null},\"active\":1},\"wp-mail-smtp\\/wp_mail_smtp.php\":{\"Name\":\"WP Mail SMTP\",\"PluginURI\":\"https:\\/\\/wpmailsmtp.com\\/\",\"Version\":\"2.8.0\",\"Description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"Author\":\"WPForms\",\"AuthorURI\":\"https:\\/\\/wpforms.com\\/\",\"TextDomain\":\"wp-mail-smtp\",\"DomainPath\":\"\\/assets\\/languages\",\"Network\":false,\"RequiresWP\":\"4.9\",\"RequiresPHP\":\"5.6.20\",\"Title\":\"WP Mail SMTP\",\"AuthorName\":\"WPForms\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-mail-smtp\",\"slug\":\"wp-mail-smtp\",\"plugin\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"new_version\":\"2.9.0\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-mail-smtp\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-mail-smtp.2.9.0.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-256x256.png?rev=1755440\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-128x128.png?rev=1755440\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-1544x500.png?rev=2468655\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-772x250.png?rev=2468655\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6.20\",\"compatibility\":[]},\"active\":1},\"wp-migrate-db\\/wp-migrate-db.php\":{\"Name\":\"WP Migrate DB\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"Version\":\"1.0.15\",\"Description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"Author\":\"Delicious Brains\",\"AuthorURI\":\"https:\\/\\/deliciousbrains.com\",\"TextDomain\":\"wp-migrate-db\",\"DomainPath\":\"\\/languages\\/\",\"Network\":true,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Migrate DB\",\"AuthorName\":\"Delicious Brains\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-migrate-db\",\"slug\":\"wp-migrate-db\",\"plugin\":\"wp-migrate-db\\/wp-migrate-db.php\",\"new_version\":\"2.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-migrate-db.2.0.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-256x256.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-128x128.jpg?rev=1809889\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-1544x500.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-772x250.jpg?rev=1809889\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"wp-statistics\\/wp-statistics.php\":{\"Name\":\"WP Statistics\",\"PluginURI\":\"https:\\/\\/wp-statistics.com\\/\",\"Version\":\"12.6.13\",\"Description\":\"Complete WordPress Analytics and Statistics for your site!\",\"Author\":\"VeronaLabs\",\"AuthorURI\":\"http:\\/\\/veronalabs.com\\/\",\"TextDomain\":\"wp-statistics\",\"DomainPath\":\"languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Statistics\",\"AuthorName\":\"VeronaLabs\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-statistics\",\"slug\":\"wp-statistics\",\"plugin\":\"wp-statistics\\/wp-statistics.php\",\"new_version\":\"13.0.8\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-statistics\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-statistics.13.0.8.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon-256x256.png?rev=1673578\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\",\"svg\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/banner-772x250.png?rev=2041108\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1}}",
"theme_upgrades": "{\"twentynineteen\":{\"update\":{\"theme\":\"twentynineteen\",\"new_version\":\"2.0\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentynineteen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentynineteen.2.0.zip\",\"requires\":\"4.9.6\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Nineteen\",\"Version\":\"1.7\",\"active\":0},\"twentyseventeen\":{\"update\":{\"theme\":\"twentyseventeen\",\"new_version\":\"2.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentyseventeen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentyseventeen.2.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Seventeen\",\"Version\":\"2.4\",\"active\":0},\"twentytwenty\":{\"update\":{\"theme\":\"twentytwenty\",\"new_version\":\"1.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentytwenty\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentytwenty.1.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Twenty\",\"Version\":\"1.5\",\"active\":0}}",
"translation_upgrades": "[]",
"premium_upgrades": "",
"securityIssues": "0",
"themes": "[{\"name\":\"Megalith\",\"title\":\"Megalith\",\"description\":\"Creative Multipurpose HTML Template\",\"version\":\"1.2.12\",\"active\":1,\"slug\":\"megalith\"},{\"name\":\"Twenty Nineteen\",\"title\":\"Twenty Nineteen\",\"description\":\"Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you&#8217;ll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you\\u2019re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it&#8217;s built to be beautiful on all screen sizes.\",\"version\":\"1.7\",\"active\":0,\"slug\":\"twentynineteen\"},{\"name\":\"Twenty Seventeen\",\"title\":\"Twenty Seventeen\",\"description\":\"Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.\",\"version\":\"2.4\",\"active\":0,\"slug\":\"twentyseventeen\"},{\"name\":\"Twenty Twenty\",\"title\":\"Twenty Twenty\",\"description\":\"Our default theme for 2020 is designed to take full advantage of the flexibility of the block editor. Organizations and businesses have the ability to create dynamic landing pages with endless layouts using the group and column blocks. The centered content column and fine-tuned typography also makes it perfect for traditional blogs. Complete editor styles give you a good idea of what your content will look like, even before you publish. You can give your site a personal touch by changing the background colors and the accent color in the Customizer. The colors of all elements on your site are automatically calculated based on the colors you pick, ensuring a high, accessible color contrast for your visitors.\",\"version\":\"1.5\",\"active\":0,\"slug\":\"twentytwenty\"}]",
"ignored_themes": "",
"plugins": "[{\"mainwp\":\"F\",\"name\":\"Akismet Anti-Spam\",\"slug\":\"akismet\\/akismet.php\",\"description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"version\":\"4.1.6\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Captcha Bank Pro Edition\",\"slug\":\"captcha-bank-pro-edition_\\/captcha-bank-pro-edition.php\",\"description\":\"This plugin allows you to implement security captcha form into web forms to prevent spam.\",\"version\":\"4.1.34\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Contact Form 7\",\"slug\":\"contact-form-7\\/wp-contact-form-7.php\",\"description\":\"Just another contact form plugin. Simple but flexible.\",\"version\":\"5.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Custom Facebook Feed Pro Developer\",\"slug\":\"custom-facebook-feed-pro\\/custom-facebook-feed.php\",\"description\":\"Add a completely customizable Facebook feed to your WordPress site\",\"version\":\"2.6.7\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Dashboard Cleanup\",\"slug\":\"dashboard-cleanup\\/dashboard-cleanup.php\",\"description\":\"Remove options include wordpress.org feed, recent drafts, right now, recent comments, incoming links, plugins box, quick press. See readme.txt before activating!\",\"version\":\"1.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Disable Comments\",\"slug\":\"disable-comments\\/disable-comments.php\",\"description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"version\":\"2.0.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Login LockDown\",\"slug\":\"login-lockdown\\/loginlockdown.php\",\"description\":\"Adds some extra security to WordPress by restricting the rate at which failed logins can be re-attempted from a given IP range. Distributed through <a href=\\\"http:\\/\\/www.bad-neighborhood.com\\/\\\" target=\\\"_blank\\\">Bad Neighborhood<\\/a>.\",\"version\":\"v1.8.1\",\"active\":1},{\"mainwp\":\"T\",\"name\":\"MainWP Child\",\"slug\":\"mainwp-child\\/mainwp-child.php\",\"description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"version\":\"4.1.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Mobile Menu\",\"slug\":\"mobile-menu\\/mobmenu.php\",\"description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"version\":\"2.8.1.8.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Really Simple SSL\",\"slug\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"version\":\"3.3.4\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Simple Contact Info\",\"slug\":\"simple-contact-info\\/contact-info.php\",\"description\":\"You can write contact information (facebook, phone, fax, address etc). You can use widgets or shortcode to display it anywhere you want.\",\"version\":\"1.1.9\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Slider Revolution\",\"slug\":\"revslider\\/revslider.php\",\"description\":\"Slider Revolution - Premium responsive slider\",\"version\":\"6.2.22\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"TeslaThemes Megalith posts\",\"slug\":\"teslathemes-custom-posts\\/teslathemes-custom-posts.php\",\"description\":\"Teslathemes custom posts\",\"version\":\"1.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WPBakery Page Builder\",\"slug\":\"js_composer\\/js_composer.php\",\"description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"version\":\"6.3.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Mail SMTP\",\"slug\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"version\":\"2.8.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB\",\"slug\":\"wp-migrate-db\\/wp-migrate-db.php\",\"description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"version\":\"1.0.15\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Statistics\",\"slug\":\"wp-statistics\\/wp-statistics.php\",\"description\":\"Complete WordPress Analytics and Statistics for your site!\",\"version\":\"12.6.13\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB Compatibility\",\"slug\":\"wp-migrate-db-pro-compatibility.php\",\"description\":\"Prevents 3rd party plugins from being loaded during WP Migrate DB specific operations\",\"version\":\"1.2\",\"active\":1,\"mu\":1}]",
"ignored_plugins": "",
"pages": "",
"users": "[]",
"categories": "[\"Ikke kategoriseret\"]",
"pluginDir": "",
"automatic_update": "0",
"backup_before_upgrade": "2",
"backups": "",
"mainwpdir": "1",
"loadFilesBeforeZip": "0",
"is_ignoreCoreUpdates": "0",
"is_ignorePluginUpdates": "0",
"is_ignoreThemeUpdates": "0",
"verify_certificate": "0",
"force_use_ipv4": "0",
"ssl_version": "0",
"ip": "",
"uniqueId": "",
"maximumFileDescriptorsOverride": "0",
"maximumFileDescriptorsAuto": "0",
"maximumFileDescriptors": "150",
"http_user": "",
"http_pass": "",
"wpe": "0",
"is_staging": "0",
"http_code_noticed": "1",
"disable_status_check": "0",
"disable_health_check": "0",
"status_check_interval": "0",
"health_threshold": "0",
"wpid": "25",
"version": "4.1.2",
"sync_errors": "",
"dtsAutomaticSync": "1606560962",
"dtsAutomaticSyncStart": "1606560951",
"dtsSync": "1626071493",
"dtsSyncStart": "1626071489",
"totalsize": "0",
"dbsize": "5144676",
"extauth": "8a78cd60e9bea8a308df",
"last_post_gmt": "0",
"health_value": "80",
"health_site_noticed": "0",
"uptodate": "",
"sync_id": "12",
"recent_comments": "[]",
"recent_posts": "[]",
"recent_pages": "[{\"id\":57,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Kontakt\",\"comment_count\":\"0\",\"dts\":1475134637,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":54,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Galleri\",\"comment_count\":\"0\",\"dts\":1472799173,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":51,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Datalogger\",\"comment_count\":\"0\",\"dts\":1546500587,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":48,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Milj\\u00f8udstyr\",\"comment_count\":\"0\",\"dts\":1546500523,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":45,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Diverse ure\",\"comment_count\":\"0\",\"dts\":1546500398,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"}]",
"phpversion": "7.4.21",
"wp_upgrades": "{\"current\":\"5.5.5\",\"new\":\"5.7.2\"}",
"favi_icon": "favi-25-favicon.ico"
}
'@ |
    ConvertFrom-Json

    $JSON.plugins | ConvertFrom-Json 

Hi again!

Hmm, well, i guess yea.

The way you are parsing here, i cant seem to make that work with a variable?

Tried this for testing:

$url1 = ren-produktion.dk
$updateprocess = Invoke-RestMethod -Method 'Get' -Uri $url1

#write-host $updateprocess

$JSON = @'
$updateprocess
'@ |
    ConvertFrom-Json

    $JSON.plugins | ConvertFrom-Json 

Just gives me:

ConvertFrom-Json : Invalid JSON primitive: .
At line:9 char:5
+     ConvertFrom-Json
+     ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
 
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At line:11 char:21
+     $JSON.plugins | ConvertFrom-Json
+                     ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

If you enclose the variable $updateprocess in a here string it will not be expanded. Just pipe it as it is.

$JSON = 
    $updateprocess |
        ConvertFrom-Json

Hi again Olaf!

Invalid JSON primitive it just says :confused:

PS C:\Users\Dern> $url1 = "ren-produktion.dk"
>> $updateprocess = Invoke-RestMethod -Method 'Get' -Uri $url1
>>
>> #write-host $updateprocess
>>
>> $JSON =
>>     $updateprocess |
>>         ConvertFrom-Json
>>
>> $plugins = $JSON.plugins | ConvertFrom-Json
>>
>> write-host $plugins
ConvertFrom-Json:
Line |
   8 |          ConvertFrom-Json
     |          ~~~~~~~~~~~~~~~~
     | Conversion from JSON failed with error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
ConvertFrom-Json:
Line |
  10 |  $plugins = $JSON.plugins | ConvertFrom-Json
     |                             ~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'InputObject' because it is null.

PS C:\Users\Dern>

It depends pretty much on the content of your variable $updateprocess. If it contains what you posted in your initial question as the JSON object it should work. If not you may change your code to get it the way you need it for the further steps.

It works in the exact same way as:
https://api.github.com/repos/PowerShell/PowerShell/releases/latest

And everything does work, except for that “subsection” of plugins that wont split orderly.

As this actually nearly works, but needs to “identify” each plugin “curly bracket” as its own, is there not some what, instead of $convertedpluigins.name to call $convertedplugins.(unique object???=

Maybe some way to do a split?

Aaaaalright, something working a bit more here :smiley:

            $updateprocess = Invoke-RestMethod -Method 'Get' -Uri $url


            foreach ($line in $updateprocess) {
                write-host "$websiteid,$websitename"
            
                $websitename = $line.name

                $convertedplugins = $line.plugins | ConvertFrom-JSON

                $selector = $convertedplugins | select-object name, version 
                write-host $selector

            }

This now gives me;

2324,domainname.com
@{name=All-in-One WP Migration; version=7.20} @{name=All-in-One WP Migration Unlimited Extension; version=2.37} @{name=Breadcrumb NavXT; version=6.4.0} @{name
=Cookie Bar; version=1.8.7} @{name=Custom Facebook Feed Pro Developer; version=3.5.3} @{name=Disable Comments; version=2.0.2} @{name=Duplicate Post; version=3
.2.4} @{name=Envira Gallery; version=1.8.4.1} @{name=Forminator; version=1.14.7} @{name=Hustle; version=7.1.1} @{name=Insert Headers and Footers; version=1.5.
0} @{name=Loco Translate; version=2.3.3} @{name=Login LockDown; version=v1.8.1} @{name=MainWP Child; version=4.1.2} @{name=Meta Box; version=5.2.10} @{name=Mo
bile Menu; version=2.8} @{name=Ninja Forms; version=3.4.24.1} @{name=Really Simple SSL; version=3.3.1} @{name=Redux; version=4.1.24} @{name=Safe SVG; version=
1.9.8} @{name=Simple 301 Redirects; version=2.0.4} @{name=Slider Revolution; version=5.4.8.2} @{name=SVG Support; version=2.3.18} @{name=Swift Framework; vers
ion=2.7.23} @{name=Tesla Framework; version=1.2.5} @{name=TeslaThemes Megalith posts; version=1.2.1} @{name=Ultimate Addons for WPBakery Page Builder; version
=3.18.0} @{name=VC Templates Import & Export; version=1.0.0} @{name=WooCommerce; version=4.0.1} @{name=WPBakery Page Builder; version=6.3.0} @{name=WP Instagr
am Widget; version=2.0.3} @{name=WP Mail SMTP; version=2.8.0} @{name=WP Migrate DB; version=2.0.1} @{name=WP Statistics; version=12.6.13} @{name=WP Migrate DB
 Compatibility; version=1.2}

So, now i just need to figure out how to split these chunks in a more presentable manner.
Do you have any suggestuins @Olaf ? :slight_smile:

The code you posted last does not make any sense at all.

Again … if you have the JSON data you posted first in your initial question you will have to convert it from JSON TWO TIMES. It seems to be JSON data empedded in JSON data. So you convert the input data from JSON and then you convert the content of JSON element with the name “plugins” again. Now you have an array / a list with the plugins and you can do whatever further steps you want … to have it a little bit easier to understand I separated the steps somewhat …

$Raw_JSON_Text = @'
{
"id": "256125",
"userid": "1",
"adminname": "AUTHUSER",
"name": "testing-domain.dk",
"url": "https://testing-domain.dk/",
"pubkey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCZXkvV2Ezd1pGSmM1VXNFL1B6QmkyK24vUnJacC8KRFFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==",
"nossl": "0",
"nosslkey": "5ea86875191.5543",
"siteurl": "https://testing-domain.dk",
"ga_id": "",
"gas_id": "0",
"offline_checks_last": "1624532378",
"offline_check_result": "1",
"http_response_code": "200",
"note": "",
"note_lastupdate": "0",
"statsUpdate": "16040458",
"directories": "{\"wp-content\":{\"mu-plugins\":null,\"revslider\":{\"admin\":null,\"includes\":null,\"languages\":null,\"public\":null,\"backup\":null},\"upgrade\":null,\"languages\":{\"themes\":null,\"plugins\":null},\"themes\":{\"twentynineteen\":null,\"megalith\":null,\"twentyseventeen\":null,\"twentytwenty\":null},\"uploads\":{\"mainwp\":null,\"2016\":null,\"revslider\":null,\"js_composer\":null,\"2021\":null,\"wp-migrate-db\":null,\"2019\":null,\"2020\":null,\"2018\":null,\"2017\":null},\"plugins\":{\"wp-mail-smtp\":null,\"mainwp-child\":null,\"captcha-bank-pro-edition_\":null,\"login-lockdown\":null,\"simple-contact-info\":null,\"contact-form-7\":null,\"really-simple-ssl_\":null,\"revslider\":null,\"wp-statistics\":null,\"js_composer\":null}},\"wp-admin\":{\"user\":null,\"network\":null,\"includes\":null,\"css\":{\"colors\":null},\"images\":null,\"maint\":null,\"js\":{\"widgets\":null}},\"wp-includes\":{\"customize\":null,\"Text\":{\"Diff\":null},\"assets\":null,\"sitemaps\":{\"providers\":null},\"SimplePie\":{\"HTTP\":null,\"Content\":null,\"Parse\":null,\"Net\":null,\"Cache\":null,\"XML\":null,\"Decode\":null},\"rest-api\":{\"search\":null,\"fields\":null,\"endpoints\":null},\"random_compat\":null,\"IXR\":null,\"ID3\":null,\"theme-compat\":null}}",
"plugin_upgrades": "{\"akismet\\/akismet.php\":{\"Name\":\"Akismet Anti-Spam\",\"PluginURI\":\"https:\\/\\/akismet.com\\/\",\"Version\":\"4.1.6\",\"Description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"Author\":\"Automattic\",\"AuthorURI\":\"https:\\/\\/automattic.com\\/wordpress-plugins\\/\",\"TextDomain\":\"akismet\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Akismet Anti-Spam\",\"AuthorName\":\"Automattic\",\"update\":{\"id\":\"w.org\\/plugins\\/akismet\",\"slug\":\"akismet\",\"plugin\":\"akismet\\/akismet.php\",\"new_version\":\"4.1.10\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/akismet\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/akismet.4.1.10.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-256x256.png?rev=969272\",\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/icon-128x128.png?rev=969272\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/akismet\\/assets\\/banner-772x250.jpg?rev=479904\"},\"banners_rtl\":[],\"tested\":\"5.8\",\"requires_php\":false,\"compatibility\":[]},\"active\":0},\"contact-form-7\\/wp-contact-form-7.php\":{\"Name\":\"Contact Form 7\",\"PluginURI\":\"https:\\/\\/contactform7.com\\/\",\"Version\":\"5.2.1\",\"Description\":\"Just another contact form plugin. Simple but flexible.\",\"Author\":\"Takayuki Miyoshi\",\"AuthorURI\":\"https:\\/\\/ideasilo.wordpress.com\\/\",\"TextDomain\":\"contact-form-7\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Contact Form 7\",\"AuthorName\":\"Takayuki Miyoshi\",\"update\":{\"id\":\"w.org\\/plugins\\/contact-form-7\",\"slug\":\"contact-form-7\",\"plugin\":\"contact-form-7\\/wp-contact-form-7.php\",\"new_version\":\"5.4.1\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/contact-form-7\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/contact-form-7.5.4.1.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon-256x256.png?rev=2279696\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\",\"svg\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/icon.svg?rev=2339255\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-1544x500.png?rev=860901\",\"1x\":\"https:\\/\\/ps.w.org\\/contact-form-7\\/assets\\/banner-772x250.png?rev=880427\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":false,\"compatibility\":[]},\"active\":1},\"disable-comments\\/disable-comments.php\":{\"Name\":\"Disable Comments\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"Version\":\"2.0.2\",\"Description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"Author\":\"WPDeveloper\",\"AuthorURI\":\"https:\\/\\/wpdeveloper.net\",\"TextDomain\":\"disable-comments\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Disable Comments\",\"AuthorName\":\"WPDeveloper\",\"update\":{\"id\":\"w.org\\/plugins\\/disable-comments\",\"slug\":\"disable-comments\",\"plugin\":\"disable-comments\\/disable-comments.php\",\"new_version\":\"2.1.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/disable-comments\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/disable-comments.2.1.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-256x256.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/icon-128x128.png?rev=2509854\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-1544x500.png?rev=2509854\",\"1x\":\"https:\\/\\/ps.w.org\\/disable-comments\\/assets\\/banner-772x250.png?rev=2509854\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"mainwp-child\\/mainwp-child.php\":{\"Name\":\"MainWP Child\",\"PluginURI\":\"https:\\/\\/mainwp.com\\/\",\"Version\":\"4.1.2\",\"Description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"Author\":\"MainWP\",\"AuthorURI\":\"https:\\/\\/mainwp.com\",\"TextDomain\":\"mainwp-child\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"3.6\",\"RequiresPHP\":\"5.6\",\"Title\":\"MainWP Child\",\"AuthorName\":\"MainWP\",\"update\":{\"id\":\"w.org\\/plugins\\/mainwp-child\",\"slug\":\"mainwp-child\",\"plugin\":\"mainwp-child\\/mainwp-child.php\",\"new_version\":\"4.1.7\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mainwp-child\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mainwp-child.4.1.7.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/icon-128x128.png?rev=2147214\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250.jpg?rev=2150284\"},\"banners_rtl\":{\"2x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-1544x500-rtl.jpg?rev=2150284\",\"1x\":\"https:\\/\\/ps.w.org\\/mainwp-child\\/assets\\/banner-772x250-rtl.jpg?rev=2150284\"},\"tested\":\"5.7.2\",\"requires_php\":\"7.0\",\"compatibility\":[]},\"active\":1},\"mobile-menu\\/mobmenu.php\":{\"Name\":\"Mobile Menu\",\"PluginURI\":\"https:\\/\\/www.wpmobilemenu.com\\/\",\"Version\":\"2.8.1.8.1\",\"Description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"Author\":\"Rui Guerreiro\",\"AuthorURI\":\"https:\\/\\/www.jedipress.com\\/\",\"TextDomain\":\"mobile-menu\",\"DomainPath\":\"\\/languages\\/\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Mobile Menu\",\"AuthorName\":\"Rui Guerreiro\",\"update\":{\"id\":\"w.org\\/plugins\\/mobile-menu\",\"slug\":\"mobile-menu\",\"plugin\":\"mobile-menu\\/mobmenu.php\",\"new_version\":\"2.8.2.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/mobile-menu\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/mobile-menu.2.8.2.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/icon-128x128.png?rev=1890426\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/mobile-menu\\/assets\\/banner-772x250.jpg?rev=1976792\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\":{\"Name\":\"Really Simple SSL\",\"PluginURI\":\"https:\\/\\/www.really-simple-ssl.com\",\"Version\":\"3.3.4\",\"Description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"Author\":\"Really Simple Plugins\",\"AuthorURI\":\"https:\\/\\/really-simple-plugins.com\",\"TextDomain\":\"really-simple-ssl\",\"DomainPath\":\"\\/languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"Really Simple SSL\",\"AuthorName\":\"Really Simple Plugins\",\"update\":{\"id\":\"w.org\\/plugins\\/really-simple-ssl\",\"slug\":\"really-simple-ssl\",\"plugin\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"new_version\":\"5.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/really-simple-ssl\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/really-simple-ssl.5.0.2.zip\",\"icons\":{\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/icon-128x128.png?rev=1782452\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-1544x500.png?rev=2320223\",\"1x\":\"https:\\/\\/ps.w.org\\/really-simple-ssl\\/assets\\/banner-772x250.png?rev=2320228\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":0},\"js_composer\\/js_composer.php\":{\"Name\":\"WPBakery Page Builder\",\"PluginURI\":\"http:\\/\\/wpbakery.com\",\"Version\":\"6.3.0\",\"Description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"Author\":\"Michael M - WPBakery.com\",\"AuthorURI\":\"http:\\/\\/wpbakery.com\",\"TextDomain\":\"js_composer\",\"DomainPath\":\"\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WPBakery Page Builder\",\"AuthorName\":\"Michael M - WPBakery.com\",\"update\":{\"slug\":\"js_composer\",\"new_version\":\"6.7\",\"plugin\":\"js_composer\\/js_composer.php\",\"url\":\"\",\"package\":false,\"name\":null},\"active\":1},\"wp-mail-smtp\\/wp_mail_smtp.php\":{\"Name\":\"WP Mail SMTP\",\"PluginURI\":\"https:\\/\\/wpmailsmtp.com\\/\",\"Version\":\"2.8.0\",\"Description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"Author\":\"WPForms\",\"AuthorURI\":\"https:\\/\\/wpforms.com\\/\",\"TextDomain\":\"wp-mail-smtp\",\"DomainPath\":\"\\/assets\\/languages\",\"Network\":false,\"RequiresWP\":\"4.9\",\"RequiresPHP\":\"5.6.20\",\"Title\":\"WP Mail SMTP\",\"AuthorName\":\"WPForms\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-mail-smtp\",\"slug\":\"wp-mail-smtp\",\"plugin\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"new_version\":\"2.9.0\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-mail-smtp\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-mail-smtp.2.9.0.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-256x256.png?rev=1755440\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/icon-128x128.png?rev=1755440\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-1544x500.png?rev=2468655\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-mail-smtp\\/assets\\/banner-772x250.png?rev=2468655\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6.20\",\"compatibility\":[]},\"active\":1},\"wp-migrate-db\\/wp-migrate-db.php\":{\"Name\":\"WP Migrate DB\",\"PluginURI\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"Version\":\"1.0.15\",\"Description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"Author\":\"Delicious Brains\",\"AuthorURI\":\"https:\\/\\/deliciousbrains.com\",\"TextDomain\":\"wp-migrate-db\",\"DomainPath\":\"\\/languages\\/\",\"Network\":true,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Migrate DB\",\"AuthorName\":\"Delicious Brains\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-migrate-db\",\"slug\":\"wp-migrate-db\",\"plugin\":\"wp-migrate-db\\/wp-migrate-db.php\",\"new_version\":\"2.0.2\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-migrate-db\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-migrate-db.2.0.2.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-256x256.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/icon-128x128.jpg?rev=1809889\"},\"banners\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-1544x500.jpg?rev=1809889\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-migrate-db\\/assets\\/banner-772x250.jpg?rev=1809889\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1},\"wp-statistics\\/wp-statistics.php\":{\"Name\":\"WP Statistics\",\"PluginURI\":\"https:\\/\\/wp-statistics.com\\/\",\"Version\":\"12.6.13\",\"Description\":\"Complete WordPress Analytics and Statistics for your site!\",\"Author\":\"VeronaLabs\",\"AuthorURI\":\"http:\\/\\/veronalabs.com\\/\",\"TextDomain\":\"wp-statistics\",\"DomainPath\":\"languages\",\"Network\":false,\"RequiresWP\":\"\",\"RequiresPHP\":\"\",\"Title\":\"WP Statistics\",\"AuthorName\":\"VeronaLabs\",\"update\":{\"id\":\"w.org\\/plugins\\/wp-statistics\",\"slug\":\"wp-statistics\",\"plugin\":\"wp-statistics\\/wp-statistics.php\",\"new_version\":\"13.0.8\",\"url\":\"https:\\/\\/wordpress.org\\/plugins\\/wp-statistics\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/plugin\\/wp-statistics.13.0.8.zip\",\"icons\":{\"2x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon-256x256.png?rev=1673578\",\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\",\"svg\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/icon.svg?rev=2041108\"},\"banners\":{\"1x\":\"https:\\/\\/ps.w.org\\/wp-statistics\\/assets\\/banner-772x250.png?rev=2041108\"},\"banners_rtl\":[],\"tested\":\"5.7.2\",\"requires_php\":\"5.6\",\"compatibility\":[]},\"active\":1}}",
"theme_upgrades": "{\"twentynineteen\":{\"update\":{\"theme\":\"twentynineteen\",\"new_version\":\"2.0\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentynineteen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentynineteen.2.0.zip\",\"requires\":\"4.9.6\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Nineteen\",\"Version\":\"1.7\",\"active\":0},\"twentyseventeen\":{\"update\":{\"theme\":\"twentyseventeen\",\"new_version\":\"2.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentyseventeen\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentyseventeen.2.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Seventeen\",\"Version\":\"2.4\",\"active\":0},\"twentytwenty\":{\"update\":{\"theme\":\"twentytwenty\",\"new_version\":\"1.7\",\"url\":\"https:\\/\\/wordpress.org\\/themes\\/twentytwenty\\/\",\"package\":\"https:\\/\\/downloads.wordpress.org\\/theme\\/twentytwenty.1.7.zip\",\"requires\":\"4.7\",\"requires_php\":\"5.2.4\"},\"Name\":\"Twenty Twenty\",\"Version\":\"1.5\",\"active\":0}}",
"translation_upgrades": "[]",
"premium_upgrades": "",
"securityIssues": "0",
"themes": "[{\"name\":\"Megalith\",\"title\":\"Megalith\",\"description\":\"Creative Multipurpose HTML Template\",\"version\":\"1.2.12\",\"active\":1,\"slug\":\"megalith\"},{\"name\":\"Twenty Nineteen\",\"title\":\"Twenty Nineteen\",\"description\":\"Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you&#8217;ll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you\\u2019re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it&#8217;s built to be beautiful on all screen sizes.\",\"version\":\"1.7\",\"active\":0,\"slug\":\"twentynineteen\"},{\"name\":\"Twenty Seventeen\",\"title\":\"Twenty Seventeen\",\"description\":\"Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.\",\"version\":\"2.4\",\"active\":0,\"slug\":\"twentyseventeen\"},{\"name\":\"Twenty Twenty\",\"title\":\"Twenty Twenty\",\"description\":\"Our default theme for 2020 is designed to take full advantage of the flexibility of the block editor. Organizations and businesses have the ability to create dynamic landing pages with endless layouts using the group and column blocks. The centered content column and fine-tuned typography also makes it perfect for traditional blogs. Complete editor styles give you a good idea of what your content will look like, even before you publish. You can give your site a personal touch by changing the background colors and the accent color in the Customizer. The colors of all elements on your site are automatically calculated based on the colors you pick, ensuring a high, accessible color contrast for your visitors.\",\"version\":\"1.5\",\"active\":0,\"slug\":\"twentytwenty\"}]",
"ignored_themes": "",
"plugins": "[{\"mainwp\":\"F\",\"name\":\"Akismet Anti-Spam\",\"slug\":\"akismet\\/akismet.php\",\"description\":\"Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam<\\/strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.\",\"version\":\"4.1.6\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Captcha Bank Pro Edition\",\"slug\":\"captcha-bank-pro-edition_\\/captcha-bank-pro-edition.php\",\"description\":\"This plugin allows you to implement security captcha form into web forms to prevent spam.\",\"version\":\"4.1.34\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Contact Form 7\",\"slug\":\"contact-form-7\\/wp-contact-form-7.php\",\"description\":\"Just another contact form plugin. Simple but flexible.\",\"version\":\"5.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Custom Facebook Feed Pro Developer\",\"slug\":\"custom-facebook-feed-pro\\/custom-facebook-feed.php\",\"description\":\"Add a completely customizable Facebook feed to your WordPress site\",\"version\":\"2.6.7\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Dashboard Cleanup\",\"slug\":\"dashboard-cleanup\\/dashboard-cleanup.php\",\"description\":\"Remove options include wordpress.org feed, recent drafts, right now, recent comments, incoming links, plugins box, quick press. See readme.txt before activating!\",\"version\":\"1.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Disable Comments\",\"slug\":\"disable-comments\\/disable-comments.php\",\"description\":\"Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.\",\"version\":\"2.0.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Login LockDown\",\"slug\":\"login-lockdown\\/loginlockdown.php\",\"description\":\"Adds some extra security to WordPress by restricting the rate at which failed logins can be re-attempted from a given IP range. Distributed through <a href=\\\"http:\\/\\/www.bad-neighborhood.com\\/\\\" target=\\\"_blank\\\">Bad Neighborhood<\\/a>.\",\"version\":\"v1.8.1\",\"active\":1},{\"mainwp\":\"T\",\"name\":\"MainWP Child\",\"slug\":\"mainwp-child\\/mainwp-child.php\",\"description\":\"Provides a secure connection between your MainWP Dashboard and your WordPress sites. MainWP allows you to manage WP sites from one central location. Plugin documentation and options can be found here https:\\/\\/mainwp.com\\/help\\/.\",\"version\":\"4.1.2\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Mobile Menu\",\"slug\":\"mobile-menu\\/mobmenu.php\",\"description\":\"An easy to use WordPress responsive mobile menu. Keep your mobile visitors engaged.\",\"version\":\"2.8.1.8.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Really Simple SSL\",\"slug\":\"really-simple-ssl_\\/rlrsssl-really-simple-ssl.php\",\"description\":\"Lightweight plugin without any setup to make your site SSL proof\",\"version\":\"3.3.4\",\"active\":0},{\"mainwp\":\"F\",\"name\":\"Simple Contact Info\",\"slug\":\"simple-contact-info\\/contact-info.php\",\"description\":\"You can write contact information (facebook, phone, fax, address etc). You can use widgets or shortcode to display it anywhere you want.\",\"version\":\"1.1.9\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"Slider Revolution\",\"slug\":\"revslider\\/revslider.php\",\"description\":\"Slider Revolution - Premium responsive slider\",\"version\":\"6.2.22\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"TeslaThemes Megalith posts\",\"slug\":\"teslathemes-custom-posts\\/teslathemes-custom-posts.php\",\"description\":\"Teslathemes custom posts\",\"version\":\"1.2.1\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WPBakery Page Builder\",\"slug\":\"js_composer\\/js_composer.php\",\"description\":\"Drag and drop page builder for WordPress. Take full control over your WordPress site, build any layout you can imagine \\u2013 no programming knowledge required.\",\"version\":\"6.3.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Mail SMTP\",\"slug\":\"wp-mail-smtp\\/wp_mail_smtp.php\",\"description\":\"Reconfigures the <code>wp_mail()<\\/code> function to use Gmail\\/Mailgun\\/SendGrid\\/SMTP instead of the default <code>mail()<\\/code> and creates an options page to manage the settings.\",\"version\":\"2.8.0\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB\",\"slug\":\"wp-migrate-db\\/wp-migrate-db.php\",\"description\":\"Exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer.\",\"version\":\"1.0.15\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Statistics\",\"slug\":\"wp-statistics\\/wp-statistics.php\",\"description\":\"Complete WordPress Analytics and Statistics for your site!\",\"version\":\"12.6.13\",\"active\":1},{\"mainwp\":\"F\",\"name\":\"WP Migrate DB Compatibility\",\"slug\":\"wp-migrate-db-pro-compatibility.php\",\"description\":\"Prevents 3rd party plugins from being loaded during WP Migrate DB specific operations\",\"version\":\"1.2\",\"active\":1,\"mu\":1}]",
"ignored_plugins": "",
"pages": "",
"users": "[]",
"categories": "[\"Ikke kategoriseret\"]",
"pluginDir": "",
"automatic_update": "0",
"backup_before_upgrade": "2",
"backups": "",
"mainwpdir": "1",
"loadFilesBeforeZip": "0",
"is_ignoreCoreUpdates": "0",
"is_ignorePluginUpdates": "0",
"is_ignoreThemeUpdates": "0",
"verify_certificate": "0",
"force_use_ipv4": "0",
"ssl_version": "0",
"ip": "",
"uniqueId": "",
"maximumFileDescriptorsOverride": "0",
"maximumFileDescriptorsAuto": "0",
"maximumFileDescriptors": "150",
"http_user": "",
"http_pass": "",
"wpe": "0",
"is_staging": "0",
"http_code_noticed": "1",
"disable_status_check": "0",
"disable_health_check": "0",
"status_check_interval": "0",
"health_threshold": "0",
"wpid": "25",
"version": "4.1.2",
"sync_errors": "",
"dtsAutomaticSync": "1606560962",
"dtsAutomaticSyncStart": "1606560951",
"dtsSync": "1626071493",
"dtsSyncStart": "1626071489",
"totalsize": "0",
"dbsize": "5144676",
"extauth": "8a78cd60e9bea8a308df",
"last_post_gmt": "0",
"health_value": "80",
"health_site_noticed": "0",
"uptodate": "",
"sync_id": "12",
"recent_comments": "[]",
"recent_posts": "[]",
"recent_pages": "[{\"id\":57,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Kontakt\",\"comment_count\":\"0\",\"dts\":1475134637,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":54,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Galleri\",\"comment_count\":\"0\",\"dts\":1472799173,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":51,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Datalogger\",\"comment_count\":\"0\",\"dts\":1546500587,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":48,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Milj\\u00f8udstyr\",\"comment_count\":\"0\",\"dts\":1546500523,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"},{\"id\":45,\"post_type\":\"page\",\"status\":\"publish\",\"title\":\"Diverse ure\",\"comment_count\":\"0\",\"dts\":1546500398,\"author\":\"author\",\"categories\":\"\",\"tags\":\"\"}]",
"phpversion": "7.4.21",
"wp_upgrades": "{\"current\":\"5.5.5\",\"new\":\"5.7.2\"}",
"favi_icon": "favi-25-favicon.ico"
}
'@

$JSON_Object = $Raw_JSON_Text | ConvertFrom-Json

$PluginList = $JSON_Object.plugins | ConvertFrom-Json 

$PluginList | 
    Select-Object -Property mainwp, name, slug, version, active |
        Format-Table -AutoSize

If your input looks different to what you posted first your output will be different as well.

1 Like

FYI, I tried Olaf’s code and it worked perfectly.

oh well.
I managed to make it work with just “one ConvertFrom-Json”, the data could then be imported and automatically split in the system that was supposed to recieve it.

Thanks for the inputs and help in the matter :slight_smile:

@jonatantwn - My PowerShell version is 5.1.14409.1018, and so I do not have the newer parameters to reduce the number of ConvertFrom-Json cmdlets or to work more efficiently later with the ConvertTo-Json on a DataTable object.

I went over your posts a few times to get an idea of what you’re asking for. “Presentable manner” encompasses a wide range of options, and “make these plugins and their information into objects that can be handled like json again?” made me settle on using a DataTable object as I often map this object type as a SQL Table-Value Parameter. I included a conversion of the DataTable into JSON at the end of the code.

Notes

  • Source JSON is called from a file (named for this post).
  • A Class provides a blueprint for the data.
    • It could be extended by adding a ctor, property validations, or methods.
  • A DataTable object collects each instance of Class by way of the Add-Item function.
    • The Add-Item parameter is typed to the Class.
  • The mu key:value pair appears once in the source data, and so I cast it as the value of DBNULL.
    • $null could be substituted and might help on further development by using [string]::IsNullOrEmpty()

Demo Code

using namespace System.Data;

Class PlugIns
{
    [string] $MainWP;
    [string] $Name;
    [string] $Slug;
    [string] $Description;
    [string] $Version;
    [bool]   $Active;
    [string] $Mu;
}

$plugInCollection = [DataTable]::new();
    [void]$plugInCollection.Columns.Add("MainWP",[string]);
    [void]$plugInCollection.Columns.Add("Name",[string]);
    [void]$plugInCollection.Columns.Add("Slug",[string]);
    [void]$plugInCollection.Columns.Add("Description",[string]);
    [void]$plugInCollection.Columns.Add("Version",[string]);
    [void]$plugInCollection.Columns.Add("Active",[bool]);
    [void]$plugInCollection.Columns.Add("Mu",[string]);

function Add-Item([Plugins]$item)
{
    $row = $plugInCollection.NewRow();
    $row.MainWP = $item.MainWP;
    $row.Name = $item.Name;
    $row.Slug = $item.Slug;
    $row.Description = $item.Description;
    $row.Version = $item.Version;
    $row.Active = $item.Active;
    $row.Mu = $item.Mu;
    $plugInCollection.Rows.Add($row);
}

foreach ($i in (Get-Content A:\splitting-data-from-json-import.json)|ConvertFrom-Json)
{
    $j = $i.plugins|ConvertFrom-Json;
    foreach($k in $j)
    {
        $p = [PlugIns]::new()
        $p.MainWP = $k.mainwp;
        $p.Name = $k.name;
        $p.Slug = $k.slug;
        $p.Description = $k.description;
        $p.Version = $k.version;
        $p.Active = $k.active;
        $p.Mu = if(!($k.Mu)){[DBNULL]::Value}else{$k.Mu};
        Add-Item($p);
    }
}

# reformat DataTable back into JSON
$plugInCollection.Rows|Select-Object -Property MainWP,Name,Slug,Description,Version,Active,Mu|ConvertTo-Json;

Results

As JSON

DataTable

Measure-Command without last line of output

MeasureCommand