<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [getFormat](./ibm-cloud-sdk-core.getformat.md)

## getFormat() function

Returns the first match from formats that is key the params map otherwise null

**Signature:**

```typescript
export declare function getFormat(params: {
    [key: string]: any;
}, formats: string[]): string;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

params


</td><td>

{ \[key: string\]: any; }


</td><td>

The parameters.


</td></tr>
<tr><td>

formats


</td><td>

string\[\]


</td><td>


</td></tr>
</tbody></table>
**Returns:**

string

