On 09/16/2015 08:27 PM, Robert Hanson wrote:
> Use of "*:"or "," does result in copying. Use of the actual key does not:
>
> $ x = { "b": 4,"a": 3,"d": { "d2": 4,"d1": 3333 },"c": 5 }
> $ y = x.d
> $ y.d1 = 0
> $ print x.format("JSON")
>
> *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
> $ y = x.select("d,")
> $ y.d1 = -1
> $ print x.format("JSON")
>
> *{ "b": 4,"a": 3,"d": { "d2": 4,"d1": 0 },"c": 5 }*
>
I would rather need '**:' (or '**,'?) but both give an empty result in
the old and the new syntax:
----- Example -----------------------------------------------------
globalHash = [subsets: [subset1: [atomInfos: [atom1: [seqNum: 1],
atom2: [seqNum: 2],
atom3: [seqNum: 3]
]
],
subset2: {},
subset3: {}
]
];
filter = "[SELECT **: WHERE seqNum > 1]";
globalHash..subsets..subset2..atomInfos =
getProperty(globalHash..subsets..subset1..atomInfos, filter);
filter = "**: WHERE seqNum > 1";
globalHash..subsets..subset3..atomInfos =
globalHash..subsets..subset1..atomInfos.select(filter);
print globalHash..subsets
----- Example output ---------------------------------------------
{
"subset1" :
{
"atomInfos" :
{
"atom1" :
{
"seqNum" : 1
}
"atom2" :
{
"seqNum" : 2
}
"atom3" :
{
"seqNum" : 3
}
}
}
"subset2" :
{
"atomInfos" : ""
}
"subset3" :
{
"atomInfos" : ""
}
}
------------------------------------------------------------------
Regards,
Rolf
--
Rolf Huehne
Postdoc
Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany
Phone: +49 3641 65 6205
Fax: +49 3641 65 6210
E-Mail: [email protected]
Website: http://www.fli-leibniz.de
Scientific Director: Prof. Dr. K. Lenhard Rudolph
Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein
VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users