Answers for "how to select a random value in a json array LUA"

1

how to select a random value in a json array LUA

local open = io.open("array.json", "r")
local string = open:read("a")
local array = json.decode(string)
open:close()
local msg = array[math.random(1, #array)]
Posted by: Guest on September-14-2021

Code answers related to "how to select a random value in a json array LUA"

Code answers related to "Javascript"

Browse Popular Code Answers by Language