How do you create a random string in node.js from two databse fields and current time?

I have database table called random.

In that table is a column full of number records and a column with text characters.

  1. Number
  2. Character

I want to be able to query that database table and then create a strin in the format

timestamp + random Number + random Character

I have server action query which pulls out all the records from the "Random: table described above.

I have tried this: {{TIMESTAMP}}{{random.randomize().join("", "char")}}

Which works in php but throws an error in node.

stack: "ReferenceError: l is not defined↵ at randomize

Can anyone provide a method of creating a random string using node as described

timestamp + random Number + random Character

1 Like