From c93a5b9215be7e8f1c037689fba8b52cb6c20e33 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 23 Jul 2021 16:41:43 +0300 Subject: [PATCH] Update indexOn.md Fixes #1822 --- snippets/indexOn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/indexOn.md b/snippets/indexOn.md index 4bb269156..0f244395f 100644 --- a/snippets/indexOn.md +++ b/snippets/indexOn.md @@ -22,6 +22,6 @@ const indexOn = (arr, key) => indexOn([ { id: 10, name: 'apple' }, { id: 20, name: 'orange' } -], x => x.id); +], 'id'); // { '10': { name: 'apple' }, '20': { name: 'orange' } } ```