public static JavaScriptObject getJsObj(NameValuePair[] nameValuePairs) {
		JavaScriptObject paramObj = JsoHelper.createObject();
		if (nameValuePairs == null)
			return paramObj;

		for (int i = 0; i < nameValuePairs.length; i++) {
			NameValuePair param = nameValuePairs[i];
			switch (param.getType()) {
			case STRING: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValue());
				break;
			}
			case BOOLEAN: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValueAsBoolean());
				break;
			}
			case FLOAT: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValueAsFloat());
				break;
			}
			case INT: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValueAsInt());
				break;
			}
			case DATE: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValueAsDate());
				break;
			}
			default: {
				JsoHelper.setAttribute(paramObj, param.getName(),
						param.getValue());
			}
			}
		}
		return paramObj;
	}