ObjService

Project Key: MTeYmpfWgqPbiBkVHnpgnM9kh30YExdAc

Example

function camelStringExample(){
  var aString = '1 This String ';
  Logger.log(Objapp.camelString(aString)); 
}


More Examples



ObjApp (version 1)

First Release

objectToArray(String[] headers, Object[] objValues)

Changes an object like e.parameter into a 2D array useful in writting to a spreadsheet using the .setValues method

Arguments:

NameTypeDescription
headersString[][header, header, ...]
objValuesObject[][{key:value, ...}, ...]

Return Values:

TypeDescription
String[][][[value, value, ...], ...]

rangeToObjects(String[][] range)

Changes a range String[][] often returned from .getValues() into an Object[] with key value pairs. The first element in the String[][] is used to create keys

Arguments:

NameTypeDescription
rangeString[][][[key, key, ...],[value, value, ...]]

Return Values:

TypeDescription
Object[][{key:value, ...}, ...]

splitRangesToObjects(String[] headers, String[][] values)

Combines a String[] and String[][] into an Object[] with key value pairs

Arguments:

NameTypeDescription
headersString[][key, key, ...]
valuesString[][][[value, value, ...], ...]

Return Values:

TypeDescription
Objec[][{key:value, ...}, ...]

camelArray(String[] headers)

Converts a String[] to camelCase, Example: "First Name" -> "firstName"

Arguments:

NameTypeDescription
headersString[][string, string, ...]

Return Values:

TypeDescription
String[][string, string, ...]

camelString(String header)

Converts a String to camelCase, Example: "First Name" -> "firstName"

Arguments:

NameTypeDescription
headerStringString

Return Values:

TypeDescription
StringcamelCase

Subpages (2): Examples Source