Skip to content

JS - How to get and set fields of inner message field  #79

@jonathan-se

Description

@jonathan-se

Given the following message:
message A{
-- message B{
------ int32 x = 1
------ int32 y = 2
-- }
-- int32 foo = 1
-- B bar = 2
}

msg = A.deserializeBinary(buffer)

  1. Is msg.getBar().getX() is the only way to get x value? or there is a nicer solution like msg.bar.getX() (without using toObject())?

  2. How can I set the value of x field without creating a new B message?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions