Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30188
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Aleksandro <aleksandro@gmx.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: convert a string into a json object, |
| Date | Sat, 2 Apr 2016 12:03:03 -0300 |
| Organization | A noiseless patient Spider |
| Lines | 16 |
| Message-ID | <ndomp4$do6$1@dont-email.me> (permalink) |
| References | <c8134afb-b7f5-4e2d-b3e6-90f8a3594544@googlegroups.com> <906e4754-7a87-4f89-9b85-4068ac79f79a@googlegroups.com> <ndmu0v$67n$1@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 2 Apr 2016 14:59:49 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="7363fa7664fe264696fafdff2cecae6a"; logging-data="14086"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19BNzdORC/Xd1yrEMT2rMpkILkI1DIdvns=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
| In-Reply-To | <ndmu0v$67n$1@news.albasani.net> |
| Cancel-Lock | sha1:i42KK7pAsCfu+NKwyUCQ9/9tsqs= |
| Xref | csiph.com comp.lang.javascript:30188 |
Show key headers only | View raw
On 01/04/16 19:51, Stefan Weiss wrote:
> JRough wrote:
>> I struggled with it and I got this part but the result is obj: webdev???
>> kind of a weird result but maybe I don't know how to display an object in js.
> [...]
>> var jsonObj= {};
>> jsonObj= { "name": str[0]};
>> jsonObj= { "city": str[1]};
>> jsonObj = { "job": str[2]};
>
> You assign {} to jsonObj, and then you assign three other things to it. This
> cannot possibly work. Please read Stefan Ram's and my reply and try to work
> our suggestions into your code.
To clear mental ambiguities; jsonObj's value is replaced three times.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
convert a string into a json object, JRough <janis.rough@gmail.com> - 2016-03-31 19:12 -0700
Re: convert a string into a json object, Stefan Weiss <krewecherl@gmail.com> - 2016-04-01 10:42 +0200
Re: convert a string into a json object, JRough <janis.rough@gmail.com> - 2016-04-01 17:32 -0700
Re: convert a string into a json object, Stefan Weiss <krewecherl@gmail.com> - 2016-04-01 10:49 +0200
Re: convert a string into a json object, John Harris <niam@jghnorth.org.uk.invalid> - 2016-04-01 19:21 +0100
Re: convert a string into a json object, Aleksandro <aleksandro@gmx.com> - 2016-04-01 16:21 -0300
Re: convert a string into a json object, Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-01 20:36 +0100
Re: convert a string into a json object, Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 04:07 +0200
Re: convert a string into a json object, Aleksandro <aleksandro@gmx.com> - 2016-04-02 12:07 -0300
Re: convert a string into a json object, Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 17:36 +0200
Re: convert a string into a json object, Aleksandro <aleksandro@gmx.com> - 2016-04-02 21:01 -0300
Re: convert a string into a json object, Scott Sauyet <scott@sauyet.com> - 2016-04-02 20:40 +0000
Re: convert a string into a json object, Stefan Weiss <krewecherl@gmail.com> - 2016-04-02 01:18 +0200
Re: convert a string into a json object, John Harris <niam@jghnorth.org.uk.invalid> - 2016-04-02 11:29 +0100
Re: convert a string into a json object, Scott Sauyet <scott@sauyet.com> - 2016-04-02 20:30 +0000
Re: convert a string into a json object, JRough <janis.rough@gmail.com> - 2016-04-01 11:32 -0700
Re: convert a string into a json object, Stefan Weiss <krewecherl@gmail.com> - 2016-04-02 00:51 +0200
Re: convert a string into a json object, Aleksandro <aleksandro@gmx.com> - 2016-04-02 12:03 -0300
Re: convert a string into a json object, Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 03:48 +0200
Re: convert a string into a json object, Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-02 04:25 +0200
csiph-web