Function isJSON

  • Returns true if the given value is valid JSON.

    Parameters

    • val: string

    Returns boolean