Module:Sandbox/Popcorndude/test0 explained

object = object.claim = function(frame) local prop = frame.args[1] local qid = frame.args[2] local entity = mw.wikibase.getEntityObject(qid) return entity.claims[prop][0] --return tostring(prop)endreturn object