Home > Storage > PowerMax and VMAX > Storage Admin > Dell PowerMax: Ansible Modules Best Practices > Parsing JSON Output
Parsing the JSON can be tricky if there are multiple levels or nested variables. Online tools like JSON Path Finder can help. You can copy and paste your JSON and highlight the variables you are looking for, and the tool will help identify the level. For example, to reference the storageGroupId key, which is nested in the variable my_registry_details under the key mv_details, you must be explicit when referring to the key.
Figure 26 details the path to this variable value in the JSON, which can be used in your playbooks. In this example, the playbook must specify my_registry_details.mv_details.storageGroupId, which has the value Ansible_Host_SG.
The sample playbook for deprovisioning storage, shown in Figure 27, shows a more detailed example. The first task at line 63 registers the details of an existing storage group. Line 71 extracts the list of volumes in the storage group from the JSON and reassigns the variable that is used to delete all the volumes once the storage group has been deleted.