[DynamoDB]: Use scala-wrapped AttributeValues in map recursion
https://github.com/seratch/AWScala/blob/master/src/main/scala/awscala/dynamodbv2/AttributeValue.scala#L14
I've been thinking about perhaps reimplementing this to provide a more fluent interface. Since the types that come back out of the nested maps are the vanilla-java AttributeValues, traversing their output can be a little clumsy. Nesting the wrapped Awscala types instead, most likely another Seq[Attribute] would provide a slightly more fluent API.
Example:
Assume we're looking up a Double field named lat nested in map value keyed location
Currently:
attributes.find(_.name == "location").get.value.m.get.get("lat").getN.asInstanceOf[Double]
Revised:
attributes.find(_.name == "location").get.value.m.get.find(_.name == "lat").get.value.n.get.asInstanceOf[Double]
Although the syntax is slightly longer, it has the benefit that the internal attribute maps are handled exactly as the outermost ones. I think this may be more intuitive, especially for recursion. Thoughts?