Web APIs
FormData.getAll()
Returns an array of all values for a name, preserving their entry order; empty array for an absent name.
Formal Syntax & Structure
javascript syntaxjavascript
data.getAll(name)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Entry name. |
Return Value
Array<string | File>
Matching values in order.
Working Example
Example Snippetjavascript
const d=new FormData();d.append("tag","a");d.append("tag","b");console.log(d.get("tag"),JSON.stringify(d.getAll("tag")),JSON.stringify(d.getAll("missing")));