Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #19334
| Newsgroups | comp.lang.php |
|---|---|
| Date | 2023-02-16 04:50 -0800 |
| References | <tpiebr$cso$64@gallifrey.nk.ca> <1rb3ua6kn88tn.objz7l6azwbd.dlg@40tude.net> |
| Message-ID | <79d2b4cc-e6c0-436e-ac98-e8cdfaeaf004n@googlegroups.com> (permalink) |
| Subject | Re: Stripping [ ] from JSON arrays |
| From | Y A <y000000000000@ya.ee> |
You have looked out: http://webchatsoftware.ezyro.com ?
On Tuesday, January 10, 2023 at 6:29:21 AM UTC+2, JJ wrote:
> On Tue, 10 Jan 2023 01:17:47 -0000 (UTC), The Doctor wrote:
> >
> > How do I strip unnecessary [] ?
> I'd use array's `reduce()` for that. e.g.
>
> var resultObj = theArray.reduce((res, obj) => Object.assign(res, obj), {});
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar
Stripping [ ] from JSON arrays doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-01-10 01:17 +0000
Re: Stripping [ ] from JSON arrays JJ <jj4public@outlook.com> - 2023-01-10 11:29 +0700
Re: Stripping [ ] from JSON arrays Elhwen Dico <elhwen.dicote@gmail.com> - 2023-01-11 17:09 +0100
Re: Stripping [ ] from JSON arrays doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-01-11 16:18 +0000
Re: Stripping [ ] from JSON arrays Y A <y000000000000@ya.ee> - 2023-02-16 04:50 -0800
Re: Stripping [ ] from JSON arrays Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2023-01-10 08:10 +0000
Re: Stripping [ ] from JSON arrays Y A <y000000000000@ya.ee> - 2023-02-16 04:51 -0800
csiph-web