Query String to Object

Last updated: March 24th 2020

This is a craft cms filter which converts query string to Object. You have to call this filter on Query string. Filter can be called as queryToObj.

Installation

Open your terminal and go to your Craft project:
cd /path/to/project
Run this command to load the plugin:
composer require amici/craft-querystring-to-object

In the Control Panel, go to Settings → Plugins and click the “Install” button for "Query string to Object".

Usage

{% set obj = craft.app.request.queryStringWithoutPath | queryToObj %}
{% set obj = craft.app.request.queryString | queryToObj %}