Wireshark lua scripting to dissect CoAP option

Keywords´╝Ü lua wireshark coap

Question: 

I'm writing lua script to dissect coap protocol. However I cannnot get coap options(URI-Path) of 2nd or later if there are several same options.

do
 local test_proto = Proto("test_proto", "Test Protocol")
 local test_uripath = ProtoField.string("test.uripath", "Uri-Path")
 test_proto.fields = {test_uripath}
 local coap_uripath = Field.new("coap.opt.uri_path")
 function test_proto.dissector(tvbuffer, pinfo, treeitem)
  local subtree = treeitem:add(test_proto)
  subtree:add(test_uripath, tostring(coap_uripath().value))
 end
register_postdissector(test_proto)
end

Only first URI-Path is displayed at subtree even if coap URI-Path option has several value like the following.

Opt Name: #1: URI-Path: XXX
Opt Name: #2: URI-Path: YYY

I can get only first URI-Path value by using coap.opt.uri_path. How can I get 2nd or later same option fileds?

Answers: