PynamoDB icon indicating copy to clipboard operation
PynamoDB copied to clipboard

How to expands multiple nested structures?

Open cln-m4rie opened this issue 2 years ago • 0 comments

For Example


class ChildB(MapAttribute):
    id = UnicodeAttribute()

class ChildA(MapAttribute):
    id = UnicodeAttribute()
    child_b = ChildB()

class Parent(models.Model):
    child_a = ChildA()

Output

{
    "parent": {
        "child_a": {
            "id": "",
            "child_b": {
                "id": ""
            }
        }
    }
}

cln-m4rie avatar Apr 06 '23 06:04 cln-m4rie