Please see
def props: List[(String,JsExp)]
and
def +*(other: JsObj)
would this suffice ?
+* looks like an awkward name to me ... ++ expresses concatenation
better IMHO.
Br's,
Marius
On Mar 24, 8:36 pm, Tim Perrett timo...@getintheloop.eu wrote:
Hey guys,
So, I have a JsObj with a
Hmm, I saw those methods but they are not documented so didnt know
what they did!
Will +* replace an object thats the same?
On Mar 24, 6:45 pm, marius d. marius.dan...@gmail.com wrote:
Please see
def props: List[(String,JsExp)]
and
def +*(other: JsObj)
would this suffice ?
+* looks
Hmm, it seems like this is not enough as lists do not care for keys.
In my use case, im actually building a library for something that
provide default options that are inserted into a flash object. So,
given:
{ key: 'value', something: 'else' }
I *need* to only have one of the something key, as
oops typo Perreyt = Perrett :D
On Mar 24, 10:15 pm, marius d. marius.dan...@gmail.com wrote:
On Mar 24, 9:46 pm, Timothy Perrett timo...@getintheloop.eu wrote:
Hmm, it seems like this is not enough as lists do not care for keys.
A valid JSON structure allows multiple properties with the
Tim,
I'm suggest going back to using a Map. If you're having problems with Map,
then you'll have problems with JsObj. Debug your Map problem and all should
be good.
Thanks,
David
On Tue, Mar 24, 2009 at 12:46 PM, Timothy Perrett
timo...@getintheloop.euwrote:
Hmm, it seems like this is not
Hey Marius,
Not difficult but not convenient either such as:
def update(name: String, newVal: JsExp, obj: JsObj) = (for (found -
obj.props if found._1 != name) yield found) ::: List(name, newVal)
I think your exactly right - its doable, but it just feels dirty.
lol.
Personally I'm fine
On Mar 24, 10:27 pm, Timothy Perrett timo...@getintheloop.eu wrote:
Hey Marius,
Not difficult but not convenient either such as:
def update(name: String, newVal: JsExp, obj: JsObj) = (for (found -
obj.props if found._1 != name) yield found) ::: List(name, newVal)
I think your exactly