ps; adding

info = eval("JSON",x)

much faster JSON parsing than just eval(x);


On Mon, May 9, 2016 at 6:39 PM, Otis Rothenberger <osrot...@icloud.com>
wrote:

> Bob,
>
> They know it! They are the ones who pointed this out to me after my
> conventional JSON extraction failed on some compounds. They explained the
> necessity of this type of loop to me:
>
> var p = data.PC_Compounds[0].props;
> pubCid = data.PC_Compounds[0].id.id.cid;
> for (var i = 0; i < p.length; i++) {
> if (p[i].urn.label == "SMILES" && p[i].urn.name == "Isomeric") {pubSmi =
> p[i].value.sval;}
> if (p[i].urn.label == "InChI" && p[i].urn.name == "Standard") {pubInchi =
> p[i].value.sval;}
> if (p[i].urn.label == "InChIKey" && p[i].urn.name == "Standard")
> {pubInchiKey = p[i].value.sval;}
> if (p[i].urn.label == "IUPAC Name" && p[i].urn.name == "Systematic")
> {pubName = p[i].value.sval;}
> }
>
> I definitely got the impression that the compound to compound variation
> was by design. If not by design, then it must be related to the evolution
> of their system. Either way, they definitely know about it.
>
> Otis
>
> --
> Otis Rothenberger
> o...@chemagic.org
> http://chemagic.org
>
> On May 9, 2016, at 7:16 PM, Robert Hanson <hans...@stolaf.edu> wrote:
>
> Then you should contact PubChem and get them to fix that.
>
>
>
>
> ------------------------------------------------------------------------------
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data
> untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to