title: Ansible: how to convert list into integer
body: <p>i have the following json output</p>
  
  <pre><code>"lc_facts": {
          "changed": false, 
          "failed": false, 
          "launch_configurations": [
              {
                  "block_device_mappings": [
                      {
                          "device_name": "/dev/sda1", 
                          "ebs": {
                              "delete_on_termination": true, 
                              "volume_size": 40, 
                              "volume_type": "gp2"
                          }
                      }
                  ]
              }
         ]
    }
  </code></pre>
  
  <p>The query below</p>
  
  <pre><code>- debug:
      msg: "{{ lc_facts.launch_configurations|json_query('[*].block_device_mappings[0].ebs.[volume_size]') | flatten }}"
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>    "msg": [
      [40]
      ]
  </code></pre>
  
  <p>i want to convert into an integer so i can use this value. i tried everything, but all i want is to get number only without brackets. i also added <code>|int</code> in the end, but it gives me 0 value, which is weird.</p>
  
  <p>please help, i am really in trouble. </p>