# Working with globalMap variables in a Job

Use the PutValueToExternalMap and GetValueFromExternalMap functions to define and use globalMap variables in maps.

## About this task

In this example, you want to retrieve a list of characters from the [Star Wars API](https://www.swapi.tech/). Since the response to the request is paginated, you first need to get the total number of pages and use it to define the number of loops needed to get all the data. Then you will retrieve each page number from the loop and include it in the output.

### In this section

* [Creating a JSON structure from an API response](https://help.qlik.com/talend/en-US/data-mapper-functions-reference-guide/8.0-R2024-11/creating-json-structure-from-api-response)
* [Defining a globalMap variable in a map](https://help.qlik.com/talend/en-US/data-mapper-functions-reference-guide/8.0-R2024-11/defining-globalmap-variable-in-map)
* [Using a globalMap variable in a map](https://help.qlik.com/talend/en-US/data-mapper-functions-reference-guide/8.0-R2024-11/using-globalmap-variable-in-map)